Thread (5 messages) 5 messages, 3 authors, 2025-05-27

Re: [PATCH v2 04/14] x86: Handle KCOV __init vs inline mismatches

From: Kees Cook <kees@kernel.org>
Date: 2025-05-23 20:28:31
Also in: kvm, kvmarm, linux-acpi, linux-doc, linux-efi, linux-hardening, linux-kbuild, linux-kselftest, linux-mm, linux-riscv, linux-s390, linux-security-module, lkml, llvm, platform-driver-x86, sparclinux

On Fri, May 23, 2025 at 07:35:03AM -0700, Sean Christopherson wrote:
On Thu, May 22, 2025, Kees Cook wrote:
quoted
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 921c1c783bc1..72f13d643fca 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -420,7 +420,7 @@ static u64 kvm_steal_clock(int cpu)
 	return steal;
 }
 
-static inline void __set_percpu_decrypted(void *ptr, unsigned long size)
+static __always_inline void __set_percpu_decrypted(void *ptr, unsigned long size)
I'd rather drop the "inline" and explicitly mark this "__init".  There's value
in documenting and enforcing that memory is marked decrypted/shared only during
boot.
Sure! I will swap this around. Thanks!

-Kees

-- 
Kees Cook
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help