linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Russell King <linux@armlinux.org.uk>,
	Arnd Bergmann <arnd@kernel.org>, Ard Biesheuvel <ardb@kernel.org>
Cc: clang-built-linux@googlegroups.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Nathan Chancellor <nathan@kernel.org>,
	Peter Smith <peter.smith@arm.com>,
	Renato Golin <rengolin@systemcall.eu>,
	David Spickett <david.spickett@linaro.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	"kernelci . org bot" <bot@kernelci.org>
Subject: [PATCH v5 1/2] ARM: kprobes: fix UNPREDICTABLE warnings
Date: Wed, 10 Feb 2021 18:51:48 -0800	[thread overview]
Message-ID: <20210211025149.3544593-2-ndesaulniers@google.com> (raw)
In-Reply-To: <20210211025149.3544593-1-ndesaulniers@google.com>

GNU as warns twice for this file:
Warning: using r15 results in unpredictable behaviour

via the Arm ARM:
K1.1.1 Overview of the constraints on Armv7 UNPREDICTABLE behaviors

  The term UNPREDICTABLE describes a number of cases where the
  architecture has a feature that software must not use.

Link: https://github.com/ClangBuiltLinux/linux/issues/1271
Link: https://reviews.llvm.org/D95586
Reported-by: kernelci.org bot <bot@kernelci.org>
Suggested-by: Peter Smith <peter.smith@arm.com>
Suggested-by: Renato Golin <rengolin@systemcall.eu>
Suggested-by: David Spickett <david.spickett@linaro.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
 arch/arm/probes/kprobes/test-arm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/probes/kprobes/test-arm.c b/arch/arm/probes/kprobes/test-arm.c
index 977369f1aa48..2543106a203e 100644
--- a/arch/arm/probes/kprobes/test-arm.c
+++ b/arch/arm/probes/kprobes/test-arm.c
@@ -166,10 +166,10 @@ void kprobe_arm_test_cases(void)
 
 	/* Data-processing with PC as a target and status registers updated */
 	TEST_UNSUPPORTED("movs	pc, r1")
-	TEST_UNSUPPORTED("movs	pc, r1, lsl r2")
+	TEST_UNSUPPORTED(__inst_arm(0xe1b0f211) "	@movs	pc, r1, lsl r2")
 	TEST_UNSUPPORTED("movs	pc, #0x10000")
 	TEST_UNSUPPORTED("adds	pc, lr, r1")
-	TEST_UNSUPPORTED("adds	pc, lr, r1, lsl r2")
+	TEST_UNSUPPORTED(__inst_arm(0xe09ef211) "	@adds	pc, lr, r1, lsl r2")
 	TEST_UNSUPPORTED("adds	pc, lr, #4")
 
 	/* Data-processing with SP as target */
-- 
2.30.0.478.g8a0d178c01-goog


  reply	other threads:[~2021-02-11  2:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11  2:51 [PATCH v5 0/2] ARM: kprobes: asm warning fixes and UAL conversion Nick Desaulniers
2021-02-11  2:51 ` Nick Desaulniers [this message]
2021-02-11  8:15   ` [PATCH v5 1/2] ARM: kprobes: fix UNPREDICTABLE warnings Ard Biesheuvel
2021-02-11 19:05     ` Nick Desaulniers
2021-02-11  2:51 ` [PATCH v5 2/2] ARM: kprobes: rewrite test-arm.c in UAL Nick Desaulniers
2021-02-11  8:15   ` Ard Biesheuvel
2021-02-11 17:43   ` Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210211025149.3544593-2-ndesaulniers@google.com \
    --to=ndesaulniers@google.com \
    --cc=ardb@kernel.org \
    --cc=arnd@kernel.org \
    --cc=bot@kernelci.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=david.spickett@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=nathan@kernel.org \
    --cc=peter.smith@arm.com \
    --cc=rengolin@systemcall.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).