From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932615AbeAXVEv (ORCPT ); Wed, 24 Jan 2018 16:04:51 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:61809 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932364AbeAXVEu (ORCPT ); Wed, 24 Jan 2018 16:04:50 -0500 From: Arnd Bergmann To: Russell King Cc: Ard Biesheuvel , Arnd Bergmann , Masami Hiramatsu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: kprobes: fix gcc-7 build warning Date: Wed, 24 Jan 2018 22:04:06 +0100 Message-Id: <20180124210421.104618-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:s98/58bfsF9JR/V83NMlNroM8898IRe/TFa5BDGg1tVDIgMz623 I1BHHzhdrORaYwtP7y6xxtTM2CS5RjJ5J7RCEULjrG1GE6VYHGMF3E1mlUafF2s0TROzWqr vzyDpEuqAfQ0b5dg1gmazSBd3kyzfuIwz7kqarwaawl7jHVmbflHWhXYw6Oq7urZbqVNJAu RBDLvwwkYUvUxKoH0C7TA== X-UI-Out-Filterresults: notjunk:1;V01:K0:HyejhuFwaT4=:q+j+Lah4qvsv/tkpGvZMML vCLYGEidBahZxV2LjtEKcqMv8PtgKeHUrx2RbAXFFQ88WcXPJi+Lb17WCSUbD7L0hykphRaHm XUQA3qWlLaYWZafdCM3JRZHY/EUpyF7oxivtEQIdLb9INBX7LtDivhp3hTi9rnDcMVKpiFWOZ jRV/3kl+jgNxqORKK9IAPNhiW4Vt7ZBaDqUVjLUvV17GSg09HStFKsUnBx19NV/D9P4mBhj/k 4hMgYEIXw04Jmh3B/3Mzl+FZjGAmi/MIRkUqLhU7XbZF0U8n0GlE6xyV8M+M9XuRbJTJ4dDPs cGJjYzzMzJ/F3YVNbMizcp7mgCRyqROh3DettHsYjgVjwKcn4hIT/fWJz8u+VheZddMyYSpkd 61wVTLJoIHo42/rSkBd7DDbxPHtiQlIM9UuEumzgNCbLbEcw5pZXj3MTAyf+uJGvNCmLthVqD hkHKdcxfS7Qwt/N2o32Iz0e8pnpGcB6v7UpY4tUeY6GYhfKSO4wqxSYQ44UrWwgVQkJkZSvSQ K3AUme2sE/sfJLv5cg0xl/mt9S6npCQJ64251fNcsJZwfinI9W2BB7CN+3hDGyGeUsPn3wlJc srZRV2UrpWd8TWUc4r+u+OmlbTG8h9zxOgUUgNWrJJ+j2DYHa9xq6ZhJvi0oO+b0d0g1+oBL0 rBijuPZPxwgS6BBoF/1DhT3Up1slycEC0mKuyONvYHCtiPk65LNE7Y7mC4b9Kmx4V9Xox0B+y QRoBW7c3eb7swXTUBqYcOwMTLdeNPNAQG61b7Q== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Masami Hiramatsu Signed-off-by: Arnd Bergmann --- 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