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-next>] [day] [month] [year] [list]
Message-Id: <13835555f8ef44b21d1b7ddfe1c4203d0981f77e.1551824161.git.stefan@agner.ch>
Date:   Tue,  5 Mar 2019 23:18:26 +0100
From:   Stefan Agner <stefan@...er.ch>
To:     linux@...linux.org.uk
Cc:     will.deacon@....com, ndesaulniers@...gle.com,
        natechancellor@...il.com, arnd@...db.de, ard.biesheuvel@...aro.org,
        nicolas.pitre@...aro.org, thierry.reding@...il.com,
        julien.thierry@....com, mark.rutland@....com,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Stefan Agner <stefan@...er.ch>
Subject: [PATCH 1/2] ARM: drop unnecessary WASM

The W macro for generating wide instructions when targeting Thumb-2
is not required for the preload data instructions (pld, pldw) since
they are only available as wide instructions. The GNU assembler seems
to work with or without the .w appended when compiling an Thumb-2
kernel. However, Clang's integrated assembler does not consider the
.w variants as valid instructions:

  ./arch/arm/include/asm/processor.h:133:5: error: invalid instruction
                          "pldw.w\t%a0 \n"
                           ^
  <inline asm>:2:1: note: instantiated into assembly here
  pldw.w  [r0]
  ^
  1 error generated.

Drop the macro to make sure non-wide variants of pld and pldw are
emitted in all cases.

Signed-off-by: Stefan Agner <stefan@...er.ch>
---
 arch/arm/include/asm/processor.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h
index 120f4c9bbfde..042d77cf686d 100644
--- a/arch/arm/include/asm/processor.h
+++ b/arch/arm/include/asm/processor.h
@@ -131,8 +131,8 @@ static inline void prefetchw(const void *ptr)
 	__asm__ __volatile__(
 		".arch_extension	mp\n"
 		__ALT_SMP_ASM(
-			WASM(pldw)		"\t%a0",
-			WASM(pld)		"\t%a0"
+			"pldw\t%a0",
+			"pld\t%a0"
 		)
 		:: "p" (ptr));
 }
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ