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: <20240501122918.3831734-5-usama.anjum@collabora.com>
Date: Wed,  1 May 2024 17:29:14 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Shuah Khan <shuah@...nel.org>,
	Nathan Chancellor <nathan@...nel.org>,
	Nick Desaulniers <ndesaulniers@...gle.com>,
	Bill Wendling <morbo@...gle.com>,
	Justin Stitt <justinstitt@...gle.com>,
	Muhammad Usama Anjum <usama.anjum@...labora.com>,
	Rick Edgecombe <rick.p.edgecombe@...el.com>,
	"Mike Rapoport (IBM)" <rppt@...nel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Alexey Dobriyan <adobriyan@...il.com>,
	Binbin Wu <binbin.wu@...ux.intel.com>,
	"Chang S. Bae" <chang.seok.bae@...el.com>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	linux-kselftest@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	llvm@...ts.linux.dev
Cc: kernel@...labora.com
Subject: [PATCH 4/8] selftests: x86: fsgsbase_restore: fix asm directive from =rm to =r

The clang gives unknown use of instruction mnemonic error. Fix it by
specifying =r only. The operand would be placed in register only.

fsgsbase_restore.c:45:16: error: unknown use of instruction mnemonic without a size suffix
   45 |         asm volatile ("mov %" SEG ":(0), %0" : "=rm" (ret));
      |                       ^
<inline asm>:1:2: note: instantiated into assembly here
    1 |         mov %fs:(0), 20(%esp)
      |         ^
fsgsbase_restore.c:45:16: error: unknown use of instruction mnemonic without a size suffix
   45 |         asm volatile ("mov %" SEG ":(0), %0" : "=rm" (ret));
      |                       ^
<inline asm>:1:2: note: instantiated into assembly here
    1 |         mov %fs:(0), 20(%esp)
      |         ^

Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
---
 tools/testing/selftests/x86/fsgsbase_restore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/x86/fsgsbase_restore.c b/tools/testing/selftests/x86/fsgsbase_restore.c
index 6fffadc515791..12871b482185b 100644
--- a/tools/testing/selftests/x86/fsgsbase_restore.c
+++ b/tools/testing/selftests/x86/fsgsbase_restore.c
@@ -42,7 +42,7 @@
 static unsigned int dereference_seg_base(void)
 {
 	int ret;
-	asm volatile ("mov %" SEG ":(0), %0" : "=rm" (ret));
+	asm volatile ("mov %" SEG ":(0), %0" : "=r" (ret));
 	return ret;
 }
 
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ