lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <60361f50751e6a8e38463d1cb47687f027042321.1741988314.git.jpoimboe@kernel.org>
Date: Fri, 14 Mar 2025 14:41:25 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: x86@...nel.org
Cc: linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Borislav Petkov <bp@...en8.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Uros Bizjak <ubizjak@...il.com>,
	Andrew Cooper <andrew.cooper3@...rix.com>,
	Ingo Molnar <mingo@...nel.org>
Subject: [PATCH 12/20] x86/cpu: Use alternative_io() in prefetch[w]()

Use the new alternative_io() interface in preparation for removing
alternative_input().

Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
---
 arch/x86/include/asm/processor.h | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index 2e9566134949..a1baf2fc5f9b 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -624,9 +624,10 @@ extern char			ignore_fpu_irq;
  */
 static inline void prefetch(const void *x)
 {
-	alternative_input(BASE_PREFETCH,
-			  "prefetchnta %[val]", X86_FEATURE_XMM,
-			  [val] "m" (*(const char *)x));
+	alternative_io(BASE_PREFETCH,
+		       "prefetchnta %[val]", X86_FEATURE_XMM,
+		       ARG(),
+		       ARG([val] "m" (*(const char *)x)));
 }
 
 /*
@@ -636,9 +637,10 @@ static inline void prefetch(const void *x)
  */
 static __always_inline void prefetchw(const void *x)
 {
-	alternative_input(BASE_PREFETCH,
-			  "prefetchw %[val]", X86_FEATURE_3DNOWPREFETCH,
-			  [val] "m" (*(const char *)x));
+	alternative_io(BASE_PREFETCH,
+		       "prefetchw %[val]", X86_FEATURE_3DNOWPREFETCH,
+		       ARG(),
+		       ARG([val] "m" (*(const char *)x)));
 }
 
 #define TOP_OF_INIT_STACK ((unsigned long)&init_stack + sizeof(init_stack) - \
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ