linux-stable/security
Andreas Rammhold b0efbe7e88 KEYS: trusted: Fix trusted key backends when building as module
[ Upstream commit 969a26446b ]

Before this commit the kernel could end up with no trusted key sources
even though both of the currently supported backends (TPM and TEE) were
compiled as modules. This manifested in the trusted key type not being
registered at all.

When checking if a CONFIG_… preprocessor variable is defined we only
test for the builtin (=y) case and not the module (=m) case. By using
the IS_REACHABLE() macro we do test for both cases.

Fixes: 5d0682be31 ("KEYS: trusted: Add generic trusted keys framework")
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Andreas Rammhold <andreas@rammhold.de>
Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:23:09 +02:00
..
apparmor apparmor: fix error check 2021-11-18 19:16:58 +01:00
bpf bpf: Implement task local storage 2020-11-06 08:08:37 -08:00
integrity EVM: fix the evm= __setup handler return value 2022-04-08 14:23:06 +02:00
keys KEYS: trusted: Fix trusted key backends when building as module 2022-04-08 14:23:09 +02:00
landlock landlock: Use square brackets around "landlock-ruleset" 2022-04-08 14:22:59 +02:00
loadpin LSM: Add "contents" flag to kernel_read_file hook 2020-10-05 13:37:03 +02:00
lockdown Merge branch 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2020-06-02 17:36:24 -07:00
safesetid LSM: SafeSetID: Mark safesetid_initialized as __initdata 2021-06-10 09:52:32 -07:00
selinux selinux: Fix selinux_sb_mnt_opts_compat() 2022-04-08 14:23:05 +02:00
smack smackfs: use netlbl_cfg_cipsov4_del() for deleting cipso_v4_doi 2021-11-18 19:16:39 +01:00
tomoyo tomoyo: use hwight16() in tomoyo_domain_quota_is_ok() 2022-01-05 12:42:33 +01:00
yama task_work: cleanup notification modes 2020-10-17 15:05:30 -06:00
commoncap.c Miscellaneous minor fixes for v5.13. 2021-04-27 19:32:55 -07:00
device_cgroup.c device_cgroup: Fix RCU list debugging warning 2020-08-20 11:25:03 -07:00
inode.c
Kconfig fortify: Explicitly disable Clang support 2021-11-21 13:44:13 +01:00
Kconfig.hardening hardening: Clarify Kconfig text for auto-var-init 2021-07-20 23:02:59 -07:00
lsm_audit.c audit: remove unnecessary 'ret' initialization 2021-06-11 13:21:28 -04:00
Makefile security: remove unneeded subdir-$(CONFIG_...) 2021-09-03 08:17:20 +09:00
min_addr.c
security.c binder: use cred instead of task for selinux checks 2021-11-12 15:05:48 +01:00