linux-stable/arch
Coiby Xu f7cb29b2a8 arm64: kexec_file: use more system keyrings to verify kernel image signature
commit 0d519cadf7 upstream.

Currently, when loading a kernel image via the kexec_file_load() system
call, arm64 can only use the .builtin_trusted_keys keyring to verify
a signature whereas x86 can use three more keyrings i.e.
.secondary_trusted_keys, .machine and .platform keyrings. For example,
one resulting problem is kexec'ing a kernel image  would be rejected
with the error "Lockdown: kexec: kexec of unsigned images is restricted;
see man kernel_lockdown.7".

This patch set enables arm64 to make use of the same keyrings as x86 to
verify the signature kexec'ed kernel image.

Fixes: 732b7b93d8 ("arm64: kexec_file: add kernel signature verification support")
Cc: stable@vger.kernel.org # 105e10e2cf1c: kexec_file: drop weak attribute from functions
Cc: stable@vger.kernel.org # 34d5960af253: kexec: clean up arch_kexec_kernel_verify_sig
Cc: stable@vger.kernel.org # 83b7bb2d49ae: kexec, KEYS: make the code in bzImage64_verify_sig generic
Acked-by: Baoquan He <bhe@redhat.com>
Cc: kexec@lists.infradead.org
Cc: keyrings@vger.kernel.org
Cc: linux-security-module@vger.kernel.org
Co-developed-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Coiby Xu <coxu@redhat.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-21 15:18:56 +02:00
..
alpha alpha: fix alloc_zeroed_user_highpage_movable() 2022-06-09 10:29:51 +02:00
arc ARC: remove redundant READ_ONCE() in cmpxchg loop 2022-04-18 14:47:05 -07:00
arm crypto: blake2s - remove shash module 2022-08-17 14:42:20 +02:00
arm64 arm64: kexec_file: use more system keyrings to verify kernel image signature 2022-08-21 15:18:56 +02:00
csky csky: patch_text: Fixup last cpu should be master 2022-06-09 10:30:50 +02:00
h8300 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2022-04-01 19:57:03 -07:00
hexagon ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
ia64 ia64: fix typos in comments 2022-08-17 14:40:35 +02:00
m68k m68knommu: fix undefined reference to `mach_get_rtc_pll' 2022-06-14 18:45:03 +02:00
microblaze Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
mips MIPS: Fixed __debug_virt_addr_valid() 2022-08-17 14:42:06 +02:00
nios2 nios2: use fallback for random_get_entropy() instead of zero 2022-05-30 09:24:05 +02:00
openrisc openrisc: start CPU timer early in boot 2022-06-09 10:29:44 +02:00
parisc parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode 2022-08-17 14:40:09 +02:00
powerpc powerpc/kexec: Fix build failure from uninitialised variable 2022-08-17 14:42:35 +02:00
riscv riscv: spinwait: Fix hartid variable type 2022-08-17 14:42:08 +02:00
s390 Revert "s390/smp: enforce lowcore protection on CPU restart" 2022-08-17 14:42:35 +02:00
sh sh: convert nommu io{re,un}map() to static inline functions 2022-07-22 10:21:22 +02:00
sparc signal: Deliver SIGTRAP on perf event asynchronously if blocked 2022-06-09 10:30:00 +02:00
um um: random: Don't initialise hwrng struct with zero 2022-08-17 14:41:49 +02:00
x86 kexec, KEYS: make the code in bzImage64_verify_sig generic 2022-08-21 15:18:56 +02:00
xtensa xtensa: iss: fix handling error cases in iss_net_configure() 2022-08-17 14:41:47 +02:00
.gitignore
Kconfig arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic 2022-08-17 14:40:20 +02:00