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: <20250307061203.3281-2-adobriyan@gmail.com>
Date: Fri,  7 Mar 2025 09:12:01 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: tglx@...utronix.de,
	mingo@...hat.com,
	bp@...en8.de,
	dave.hansen@...ux.intel.com
Cc: x86@...nel.org,
	hpa@...or.com,
	linux-kernel@...r.kernel.org,
	Alexey Dobriyan <adobriyan@...il.com>
Subject: [PATCH 2/4] x86/asm: delete dummy variable in clwb()

Cast to pointer-to-array instead.

Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
---
 arch/x86/include/asm/special_insns.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_insns.h
index 494a1aa19f05..d349aa0f0a83 100644
--- a/arch/x86/include/asm/special_insns.h
+++ b/arch/x86/include/asm/special_insns.h
@@ -179,17 +179,15 @@ static inline void clflushopt(volatile void *__p)
 		       "+m" (*(volatile char __force *)__p));
 }
 
-static inline void clwb(volatile void *__p)
+static inline void clwb(volatile void *p)
 {
-	volatile struct { char x[64]; } *p = __p;
-
 	asm volatile(ALTERNATIVE_2(
 		".byte 0x3e; clflush (%[pax])",
 		".byte 0x66; clflush (%[pax])", /* clflushopt (%%rax) */
 		X86_FEATURE_CLFLUSHOPT,
 		".byte 0x66, 0x0f, 0xae, 0x30",  /* clwb (%%rax) */
 		X86_FEATURE_CLWB)
-		: [p] "+m" (*p)
+		: [p] "+m" (*(volatile char(*)[64])p)
 		: [pax] "a" (p));
 }
 
-- 
2.45.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ