From 26a34633c2422f69b78c719c2f45d2fcb946a080 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Mon, 15 Apr 2019 18:32:06 +0000 Subject: [PATCH] Fix up the kexec IMA patch --- efi-lockdown.patch | 8 ++++---- efi-secureboot.patch | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/efi-lockdown.patch b/efi-lockdown.patch index b4a9ab5dd..fab50ef1a 100644 --- a/efi-lockdown.patch +++ b/efi-lockdown.patch @@ -1660,7 +1660,7 @@ This is restricted to cases where CONFIG_INTEGRITY_TRUSTED_KEYRING is set in order to prevent an attacker from loading additional keys at runtime. Signed-off-by: Matthew Garrett -Cc: Mimi Zohar +Acked-by: Mimi Zohar Cc: Dmitry Kasatkin Cc: linux-integrity@vger.kernel.org --- @@ -1672,7 +1672,7 @@ Cc: linux-integrity@vger.kernel.org 5 files changed, 68 insertions(+), 2 deletions(-) diff --git a/include/linux/ima.h b/include/linux/ima.h -index b5e16b8c50b7..05921227d700 100644 +index b5e16b8c50b7..60007b86f4fc 100644 --- a/include/linux/ima.h +++ b/include/linux/ima.h @@ -127,4 +127,13 @@ static inline int ima_inode_removexattr(struct dentry *dentry, @@ -1683,14 +1683,14 @@ index b5e16b8c50b7..05921227d700 100644 +#if defined(CONFIG_IMA_APPRAISE) && defined(CONFIG_INTEGRITY_TRUSTED_KEYRING) +extern bool ima_appraise_signature(enum kernel_read_file_id func); +#else -+static inline bool ima_appraise_kexec_signature(enum kernel_read_file_id func) ++static inline bool ima_appraise_signature(enum kernel_read_file_id func) +{ + return false; +} +#endif /* CONFIG_IMA_APPRAISE && CONFIG_INTEGRITY_TRUSTED_KEYRING */ #endif /* _LINUX_IMA_H */ diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c -index 0cfe4f6f7f85..8ffa4b75c620 100644 +index a1cc37c8b43b..7599039623a7 100644 --- a/kernel/kexec_file.c +++ b/kernel/kexec_file.c @@ -240,7 +240,12 @@ kimage_file_prepare_segments(struct kimage *image, int kernel_fd, int initrd_fd, diff --git a/efi-secureboot.patch b/efi-secureboot.patch index 102da06af..99b6f25dd 100644 --- a/efi-secureboot.patch +++ b/efi-secureboot.patch @@ -198,7 +198,7 @@ index adeee6329f55..27a54ec878bd 100644 + efi_set_secure_boot(boot_params.secure_boot); + -+ init_lockdown() ++ init_lockdown(); + dmi_scan_machine(); dmi_memdev_walk();