From patchwork Wed Aug 22 15:19:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 1362231 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 7F048DF280 for ; Wed, 22 Aug 2012 15:23:00 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T4CiJ-0002gN-J1; Wed, 22 Aug 2012 15:19:23 +0000 Received: from moutng.kundenserver.de ([212.227.126.186]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T4CiE-0002e9-Kc for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2012 15:19:19 +0000 Received: from klappe2.localnet (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0LmLB4-1TdoiE0FkY-00Zv0c; Wed, 22 Aug 2012 17:19:16 +0200 From: Arnd Bergmann To: Nicolas Pitre Subject: Re: [PATCH 4/4] ARM: kprobes: make more tests conditional Date: Wed, 22 Aug 2012 15:19:11 +0000 User-Agent: KMail/1.12.2 (Linux/3.5.0; KDE/4.3.2; x86_64; ; ) References: <1345645780-2749-1-git-send-email-arnd@arndb.de> <1345645780-2749-5-git-send-email-arnd@arndb.de> In-Reply-To: MIME-Version: 1.0 Message-Id: <201208221519.12056.arnd@arndb.de> X-Provags-ID: V02:K0:rGHplbfSHwMLSXnqV3cFblfHeCqy3ePDS+l8mkl8sB4 NDlkHo5B7KewIp4pPwXuVQ0y2GfPkck8r03ZMqv06Pj9eGRUm1 QMlSOYU0Z3Gr4hanEg4PKcpyHhD5SlryqlMnxMmsmkPfoNoxki yTRlz26i9UJfduVEh/+d0xDmuWs8eWOTJpJhajbjYAD0aggZzE +wTACDsGFoJyhPl54bS4PWdQasfo2L2phhnV8S7oB81TLbT6JF 964KpaIGglrCaTRtHuQMYiWw22UEQRZ3ntTtpKIgRgf6/PcF2P suFlcz1yFuJxifU7/DnFYqR4adglq4roCe2ZTz0tMmQ7H0LxQp ym9zTl2mICXmTn3zywE0= X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.186 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Russell King , Leif Lindholm , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jon Medhurst X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On Wednesday 22 August 2012, Nicolas Pitre wrote: > On Wed, 22 Aug 2012, Arnd Bergmann wrote: > > > The mls instruction is not available in ARMv6K or below, so we > > should make the test conditional on at least ARMv7. ldrex/strex > > are available in ARMv6K or ARMv7, which we can test by checking > > the CONFIG_CPU_32v6K symbol. Just testing for ARMv6 is not enough. > > The ldrex/strex instructions are available on ARMv6. It's only the d > variants (strexd/ldrexd) which are only available from ARMv6k. Ok. How is the version below then? I haven't tested this one yet. Arnd 8<--- From d878ab212cf0ac1957be83ad80dc734ace2b476c Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 16 Aug 2012 07:49:31 +0000 Subject: [PATCH] ARM: kprobes: make more tests conditional The mls instruction is not available in ARMv6K or below, so we should make the test conditional on at least ARMv7. ldrexd/strexd are available in ARMv6K or ARMv7, which we can test by checking the CONFIG_CPU_32v6K symbol. Just testing for ARMv6 is not enough. /tmp/ccuMTZ8D.s: Assembler messages: /tmp/ccuMTZ8D.s:22188: Error: selected processor does not support ARM mode `mls r0,r1,r2,r3' /tmp/ccuMTZ8D.s:22222: Error: selected processor does not support ARM mode `mlshi r7,r8,r9,r10' /tmp/ccuMTZ8D.s:22252: Error: selected processor does not support ARM mode `mls lr,r1,r2,r13' Signed-off-by: Arnd Bergmann Cc: Jon Medhurst Cc: Russell King Cc: Nicolas Pitre Cc: Leif Lindholm --- arch/arm/kernel/kprobes-test-arm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c index 38c1a3b..fc9f6e0 100644 --- a/arch/arm/kernel/kprobes-test-arm.c +++ b/arch/arm/kernel/kprobes-test-arm.c @@ -367,9 +367,11 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED(".word 0xe0500090 @ undef") TEST_UNSUPPORTED(".word 0xe05fff9f @ undef") +#if __LINUX_ARM_ARCH__ >= 7 TEST_RRR( "mls r0, r",1, VAL1,", r",2, VAL2,", r",3, VAL3,"") TEST_RRR( "mlshi r7, r",8, VAL3,", r",9, VAL1,", r",10, VAL2,"") TEST_RR( "mls lr, r",1, VAL2,", r",2, VAL3,", r13") +#endif TEST_UNSUPPORTED(".word 0xe06f3291 @ mls pc, r1, r2, r3") TEST_UNSUPPORTED(".word 0xe060329f @ mls r0, pc, r2, r3") TEST_UNSUPPORTED(".word 0xe0603f91 @ mls r0, r1, pc, r3") @@ -456,8 +458,10 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED(".word 0xe1700090") /* Unallocated space */ #if __LINUX_ARM_ARCH__ >= 6 TEST_UNSUPPORTED("ldrex r2, [sp]") +#ifdef CONFIG_CPU_32v6K TEST_UNSUPPORTED("strexd r0, r2, r3, [sp]") TEST_UNSUPPORTED("ldrexd r2, r3, [sp]") +#endif TEST_UNSUPPORTED("strexb r0, r2, [sp]") TEST_UNSUPPORTED("ldrexb r2, [sp]") TEST_UNSUPPORTED("strexh r0, r2, [sp]")