From: "tip-bot2 for Thomas Zimmermann" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Ard Biesheuvel <ardb@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/build] x86/efi: Implement arch_ima_efi_boot_mode() in source file
Date: Tue, 30 Jan 2024 18:36:31 -0000 [thread overview]
Message-ID: <170663979187.398.3170118854005669182.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240112095000.8952-4-tzimmermann@suse.de>
The following commit has been merged into the x86/build branch of tip:
Commit-ID: 785ddc8b6bebd958a5b6fb7b6b4aa6584c2f0cb2
Gitweb: https://git.kernel.org/tip/785ddc8b6bebd958a5b6fb7b6b4aa6584c2f0cb2
Author: Thomas Zimmermann <tzimmermann@suse.de>
AuthorDate: Fri, 12 Jan 2024 10:44:38 +01:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Tue, 30 Jan 2024 15:17:17 +01:00
x86/efi: Implement arch_ima_efi_boot_mode() in source file
The x86 implementation of arch_ima_efi_boot_mode() uses the global
boot_param state. Move it into a source file to clean up the header.
Avoid potential rebuilds of unrelated source files if boot_params
changes.
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20240112095000.8952-4-tzimmermann@suse.de
---
arch/x86/include/asm/efi.h | 5 +++--
arch/x86/platform/efi/efi.c | 5 +++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index a5d7a83..1dc600f 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -409,8 +409,9 @@ extern int __init efi_memmap_split_count(efi_memory_desc_t *md,
extern void __init efi_memmap_insert(struct efi_memory_map *old_memmap,
void *buf, struct efi_mem_range *mem);
-#define arch_ima_efi_boot_mode \
- ({ extern struct boot_params boot_params; boot_params.secure_boot; })
+extern enum efi_secureboot_mode __x86_ima_efi_boot_mode(void);
+
+#define arch_ima_efi_boot_mode __x86_ima_efi_boot_mode()
#ifdef CONFIG_EFI_RUNTIME_MAP
int efi_get_runtime_map_size(void);
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index e9f99c5..f090ec9 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -950,3 +950,8 @@ umode_t efi_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n)
}
return attr->mode;
}
+
+enum efi_secureboot_mode __x86_ima_efi_boot_mode(void)
+{
+ return boot_params.secure_boot;
+}
next prev parent reply other threads:[~2024-01-30 18:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 9:44 [PATCH v5 0/4] arch/x86: Remove unnecessary dependencies on bootparam.h Thomas Zimmermann
2024-01-12 9:44 ` [PATCH v5 1/4] arch/x86: Move UAPI setup structures into setup_data.h Thomas Zimmermann
2024-01-30 18:36 ` [tip: x86/build] x86/setup: " tip-bot2 for Thomas Zimmermann
2024-01-12 9:44 ` [PATCH v5 2/4] arch/x86: Move internal setup_data " Thomas Zimmermann
2024-01-30 18:36 ` [tip: x86/build] x86/setup: " tip-bot2 for Thomas Zimmermann
2024-01-12 9:44 ` [PATCH v5 3/4] arch/x86: Implement arch_ima_efi_boot_mode() in source file Thomas Zimmermann
2024-01-30 18:36 ` tip-bot2 for Thomas Zimmermann [this message]
2024-01-12 9:44 ` [PATCH v5 4/4] arch/x86: Do not include <asm/bootparam.h> in several files Thomas Zimmermann
2024-01-30 18:36 ` [tip: x86/build] x86: " tip-bot2 for Thomas Zimmermann
2024-01-12 17:28 ` [PATCH v5 0/4] arch/x86: Remove unnecessary dependencies on bootparam.h Ard Biesheuvel
2024-01-15 7:58 ` Thomas Zimmermann
2024-01-15 10:55 ` Ard Biesheuvel
2024-01-15 11:00 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=170663979187.398.3170118854005669182.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tzimmermann@suse.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®