Skip to content

Commit ce0d73e

Browse files
bebarinokees
authored andcommitted
loadpin: Prevent SECURITY_LOADPIN_ENFORCE=y without module decompression
If modules are built compressed, and LoadPin is enforcing by default, we must have in-kernel module decompression enabled (MODULE_DECOMPRESS). Modules will fail to load without decompression built into the kernel because they'll be blocked by LoadPin. Add a depends on clause to prevent this combination. Cc: Dmitry Torokhov <[email protected]> Cc: Douglas Anderson <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
1 parent 6d305cb commit ce0d73e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

security/loadpin/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ config SECURITY_LOADPIN
1414
config SECURITY_LOADPIN_ENFORCE
1515
bool "Enforce LoadPin at boot"
1616
depends on SECURITY_LOADPIN
17+
# Module compression breaks LoadPin unless modules are decompressed in
18+
# the kernel.
19+
depends on !MODULES || (MODULE_COMPRESS_NONE || MODULE_DECOMPRESS)
1720
help
1821
If selected, LoadPin will enforce pinning at boot. If not
1922
selected, it can be enabled at boot with the kernel parameter

0 commit comments

Comments
 (0)