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: <20180124210421.104618-1-arnd@arndb.de>
Date:   Wed, 24 Jan 2018 22:04:06 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Russell King <linux@...linux.org.uk>
Cc:     Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        Arnd Bergmann <arnd@...db.de>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ARM: kprobes: fix gcc-7 build warning

Recent versions of binutils always warn about test-arm.s:

arch/arm/probes/kprobes/test-arm.s:18262: Warning: using r15 results in unpredictable behaviour
arch/arm/probes/kprobes/test-arm.s:18337: Warning: using r15 results in unpredictable behaviour

We could work around this using the __inst_arm() macro for passing
the two instruction as a hexadecimal literal number, but as Ard
pointed out, there is no reason to leave the warnings enabled for
this file in general, we intentionally test for an instruction that
is not recommended to be used.

For consistency, this turns off the warning in both the ARM and Thumb2
versions of this file.

Suggested-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 arch/arm/probes/kprobes/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/probes/kprobes/Makefile b/arch/arm/probes/kprobes/Makefile
index 14db56f49f0a..6432578fc74b 100644
--- a/arch/arm/probes/kprobes/Makefile
+++ b/arch/arm/probes/kprobes/Makefile
@@ -11,3 +11,7 @@ obj-$(CONFIG_KPROBES)		+= actions-arm.o checkers-arm.o
 obj-$(CONFIG_OPTPROBES)		+= opt-arm.o
 test-kprobes-objs		+= test-arm.o
 endif
+
+# don't warn about intentionally bogus instructions
+CFLAGS_test-arm.o		+= -Wa,--no-warn
+CFLAGS_test-thumb.o		+= -Wa,--no-warn
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ