Sashiko discussions
 help / color / mirror / Atom feed
* Re: [PATCH v5 02/14] lockdown: Make the relationship to MODULE_SIG a dependency
       [not found] ` <20260505093229.D8CD2C2BCB4@smtp.kernel.org>
@ 2026-05-05 12:27   ` Nicolas Bouchinet
  0 siblings, 0 replies; only message in thread
From: Nicolas Bouchinet @ 2026-05-05 12:27 UTC (permalink / raw)
  To: sashiko; +Cc: Thomas Weißschuh, bpf

> > diff --git a/security/lockdown/Kconfig b/security/lockdown/Kconfig
> > index e84ddf4840101..155959205b8ea 100644
> > --- a/security/lockdown/Kconfig
> > +++ b/security/lockdown/Kconfig
> > @@ -1,7 +1,7 @@
> >  config SECURITY_LOCKDOWN_LSM
> >  	bool "Basic module for enforcing kernel lockdown"
> >  	depends on SECURITY
> > -	select MODULE_SIG if MODULES
> > +	depends on !MODULES || MODULE_SIG
> 
> Will this change silently disable CONFIG_SECURITY_LOCKDOWN_LSM in existing
> defconfigs?
> 
> Because Kconfig's savedefconfig strips out automatically selected symbols,
> many in-tree defconfigs contain CONFIG_SECURITY_LOCKDOWN_LSM=y but omit
> CONFIG_MODULE_SIG=y. Since CONFIG_MODULE_SIG has no default y, it will
> initialize to n.
> 
> With CONFIG_MODULES=y and CONFIG_MODULE_SIG=n, this new dependency evaluates
> to n. As a result, Kconfig will drop CONFIG_SECURITY_LOCKDOWN_LSM from the
> final configuration without any warnings, leaving the kernel unprotected by
> lockdown. This also degrades discoverability, hiding the Lockdown LSM in
> menuconfig unless a user explicitly enables MODULE_SIG first.

I think the bot is correct, powerpc/configs/skiroot_defconfig,
powerpc/configs/ppc64_defconfig, s390/configs/debug_defconfig and
s390/configs/defconfig all set CONFIG_SECURITY_LOCKDOWN_LSM{,_EARLY}=y.
They also set CONFIG_MODULE_SIG_FORCE=y but do not set CONFIG_MODULE_SIG
directly. The new 'depends on' condition will thus evict
CONFIG_SECURITY_LOCKDOWN_LSM{,_EARLY} from the generated .config.

Nicolas

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-05 12:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260505-module-hashes-v5-2-e174a5a49fce@weissschuh.net>
     [not found] ` <20260505093229.D8CD2C2BCB4@smtp.kernel.org>
2026-05-05 12:27   ` [PATCH v5 02/14] lockdown: Make the relationship to MODULE_SIG a dependency Nicolas Bouchinet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox