mirror-linux/security/integrity
Nathan Chancellor 7caedbb5ad integrity: Eliminate weak definition of arch_get_secureboot()
security/integrity/secure_boot.c contains a single __weak function,
which breaks recordmcount when building with clang:

  $ make -skj"$(nproc)" ARCH=powerpc LLVM=1 ppc64_defconfig security/integrity/secure_boot.o
  Cannot find symbol for section 2: .text.
  security/integrity/secure_boot.o: failed

Introduce a Kconfig symbol, CONFIG_HAVE_ARCH_GET_SECUREBOOT, to indicate
that an architecture provides a definition of arch_get_secureboot().
Provide a static inline stub when this symbol is not defined to achieve
the same effect as the __weak function, allowing secure_boot.c to be
removed altogether. Move the s390 definition of arch_get_secureboot()
out of the CONFIG_KEXEC_FILE block to ensure it is always available, as
it does not actually depend on KEXEC_FILE.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 31a6a07eef ("integrity: Make arch_ima_get_secureboot integrity-wide")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2026-03-13 11:37:13 -04:00
..
evm evm: fix security.evm for a file with IMA signature 2026-03-05 11:39:39 -05:00
ima ima: Add code comments to explain IMA iint cache atomic_flags 2026-03-11 17:28:03 -04:00
platform_certs integrity: Make arch_ima_get_secureboot integrity-wide 2026-03-05 11:10:08 -05:00
Kconfig integrity: Select CRYPTO from INTEGRITY_ASYMMETRIC_KEYS 2025-10-03 07:50:56 -04:00
Makefile integrity: Eliminate weak definition of arch_get_secureboot() 2026-03-13 11:37:13 -04:00
digsig.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
digsig_asymmetric.c pkcs7, x509: Rename ->digest to ->m 2026-01-30 11:33:08 +00:00
efi_secureboot.c integrity: Make arch_ima_get_secureboot integrity-wide 2026-03-05 11:10:08 -05:00
iint.c ima,evm: move initcalls to the LSM framework 2025-10-22 19:24:27 -04:00
integrity.h integrity: Make arch_ima_get_secureboot integrity-wide 2026-03-05 11:10:08 -05:00
integrity_audit.c integrity: check the return value of audit_log_start() 2022-02-02 11:44:23 -05:00