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]
Date:   Wed, 26 Apr 2017 21:34:05 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     x86@...nel.org, tglx@...utronix.de, mingo@...hat.com, hpa@...or.com
Cc:     linux-kernel@...r.kernel.org, bp@...e.de
Subject: [PATCH 4/5] x86_64: clobber "cc" in inlined clear_page()

Both REP variants clobber flags because of "xor eax, eax" instructions.
While they can be changed to "mov eax, 0", generic version probably
can not because it has to do comparison at some point.

And it is kind of not worth it to not clobber flags anyway.

Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
---

 arch/x86/include/asm/page_64.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/include/asm/page_64.h
+++ b/arch/x86/include/asm/page_64.h
@@ -46,7 +46,7 @@ static inline void clear_page(void *page)
 			   clear_page_rep_stosb, X86_FEATURE_ERMS,
 			   "=D" (page),
 			   "0" (page)
-			   : "memory", "rax", "rcx");
+			   : "cc", "memory", "rax", "rcx");
 }
 
 void copy_page_mov(void *to, void *from);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ