From patchwork Wed Jan 24 21:04:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10183077 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C59BB60353 for ; Wed, 24 Jan 2018 21:04:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98F4228924 for ; Wed, 24 Jan 2018 21:04:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CAA028962; Wed, 24 Jan 2018 21:04:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A060B28924 for ; Wed, 24 Jan 2018 21:04:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=o6xIvzsCR9OO3BEFUiwgv0XE/iBye9RHHjVOwAzQdd8=; b=OdN kb/RcsX28xjAuXIC5hNBcZ0gKsfAYoMnc/Ofitw5Y+8OJsa9ksusx7wMwa5IadSqva9FdzRqlWFtn AfUvR652JnMgHxSyMDDpy/e62aiHJxH07Zr0KvIVPsUEIftMcRIMEgjnCnJsmEaflxlBu0AdBZ+uH 0aOyUi2AOs93Nv5tFTnTAGd6nUsrtQ2dGkP+b89qjgYL1vsio5fnnvfu1rMF1p6g4MrnJDVwEhapO NSb8HOSaKFnbb4uBnAKoQZH0FV9fcVOGX4aCI/6o3AtapT6oEVte2a4ANTSXxWGfxx+U4ZVwhzU8u uSXG2AWl1vIqyHlOBXHfbSDs0HDJFFg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eeSDv-0006IF-FT; Wed, 24 Jan 2018 21:04:47 +0000 Received: from mout.kundenserver.de ([212.227.126.135]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eeSDr-00063L-3Z for linux-arm-kernel@lists.infradead.org; Wed, 24 Jan 2018 21:04:45 +0000 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0LehOU-1f8WFL02e6-00qOf7; Wed, 24 Jan 2018 22:04:25 +0100 From: Arnd Bergmann To: Russell King 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== X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Masami Hiramatsu , Arnd Bergmann , Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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