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: <bf62192a-ab6a-dade-2a06-73d27fe02282@suse.com>
Date:   Thu, 6 Oct 2022 09:24:42 +0200
From:   Jan Beulich <jbeulich@...e.com>
To:     the arch/x86 maintainers <x86@...nel.org>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>
Subject: [PATCH] x86/assembly: replace MOVSD uses

D-suffixed mnemonics do not exist in AT&T syntax; an L suffix is to be
used instead. MOVSD and CMPSD are only SSE2 instructions in AT&T mode.
Future gas versions may at least warn about such bogus uses. (Due to an
implementation detail [read: bug] gas has been supporting MOVSD and
CMPSD as string instructions, but not any of the other mnemonics where
Intel/AMD documentation enumerates a possible D suffix, e.g. STOS or
IRET. Clang's integrated assembler, yet more oddly, supports only MOVSD
as a string instruction, and apparently only without any operands.)

Signed-off-by: Jan Beulich <jbeulich@...e.com>
---
I also view as questionable the use of semicolons in two of the three
instances changed - REP isn't really an instruction on its own. I wasn't
sure though whether adjusting this at the same time would be deemed
acceptable.

--- a/arch/x86/boot/bioscall.S
+++ b/arch/x86/boot/bioscall.S
@@ -32,7 +32,7 @@ intcall:
 	movw	%dx, %si
 	movw	%sp, %di
 	movw	$11, %cx
-	rep; movsd
+	rep; movsl
 
 	/* Pop full state from the stack */
 	popal
@@ -67,7 +67,7 @@ intcall:
 	jz	4f
 	movw	%sp, %si
 	movw	$11, %cx
-	rep; movsd
+	rep; movsl
 4:	addw	$44, %sp
 
 	/* Restore state and return */
--- a/arch/x86/lib/iomap_copy_64.S
+++ b/arch/x86/lib/iomap_copy_64.S
@@ -10,6 +10,6 @@
  */
 SYM_FUNC_START(__iowrite32_copy)
 	movl %edx,%ecx
-	rep movsd
+	rep movsl
 	RET
 SYM_FUNC_END(__iowrite32_copy)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ