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>] [day] [month] [year] [list]
Message-ID: <20180517213135.GB4047@avx2>
Date:   Fri, 18 May 2018 00:31:35 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     tglx@...utronix.de, mingo@...hat.com, hpa@...or.com
Cc:     x86@...nel, linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] x86: verify_cpu: use XOR for CPUID.EAX=0

MOV eax, imm32 is 5 bytes. XOR eax, eax is 2 bytes.

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

 arch/x86/kernel/verify_cpu.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/verify_cpu.S
+++ b/arch/x86/kernel/verify_cpu.S
@@ -51,7 +51,7 @@ ENTRY(verify_cpu)
 	jz	.Lverify_cpu_no_longmode	# cpu has no cpuid
 #endif
 
-	movl	$0x0,%eax		# See if cpuid 1 is implemented
+	xor	%eax, %eax		# See if cpuid 1 is implemented
 	cpuid
 	cmpl	$0x1,%eax
 	jb	.Lverify_cpu_no_longmode	# no cpuid 1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ