Skip to contentSkip to conversation

dm-crypt.ko external kernel module

dm-crypt Tapas Sarangi 2 participants 3 messages Jul 5, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

Is there a way to build external kernel module dm-crypt.ko that is not included by default in the kernel configs ? Is there any instruction on where to get the source tarball etc... ?

Thanks for any help.
-Tapas

________________________________

This transmission may contain information that is privileged, confidential, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format.

#1 lore raw
Quoted 3 lines · Tapas Sarangi

Is there a way to build external kernel module dm-crypt.ko that is not included by default in the kernel configs ? Is there any instruction on where to get the source tarball etc… ?

While is possible (in some configurations) to build kernel module separately with the help of simple makefile and some kernel headers, it is not the way dmcrypt should be used.

The reason is that code is directly dependent on internal kernel structures and also requires some other config options (like device-mapper infrastructure, kernel crypto API and particular kernel block layer settings).

The dmcrypt is included in the mainline kernel, there is no need for separate source tarball, just use mainline kernel source (drivers/md/dmcrypt.c is the module core).

Your distro must have these sources available if they are distributing binaries (it is GPL code), so you can always compile modules from it.

Milan

#2 lore raw

Hi Milan,

Thanks for your response. The distro I am using does not have CONFIG_DM_CRYPT enabled. I am aware of the Kernel compilation methods for standalone external modules and looking at your comment, it seems to be the only way for me now.

Yes, I am also aware that DM_CRYPT will be build again a specific kernel in order to be usable.

Thanks again.
-Tapas

Quoted 22 lines · Milan Broz
Quoted 3 lines · Tapas Sarangi

Is there a way to build external kernel module dm-crypt.ko that is not included by default in the kernel configs ? Is there any instruction on where to get the source tarball etcŠ ?

While is possible (in some configurations) to build kernel module separately
with the help of simple makefile and some kernel headers, it is not the way dmcrypt
should be used.

The reason is that code is directly dependent on internal kernel structures
and also requires some other config options (like device-mapper infrastructure,
kernel crypto API and particular kernel block layer settings).

The dmcrypt is included in the mainline kernel, there is no need for separate
source tarball, just use mainline kernel source (drivers/md/dmcrypt.c is the module core).

Quoted 5 lines

Your distro must have these sources available if they are distributing binaries
(it is GPL code), so you can always compile modules from it.

Milan

________________________________

This transmission may contain information that is privileged, confidential, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format.