From: dave.long@linaro.org (David Long)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: kprobes: Disallow instructions with PC and register specified shift
Date: Mon, 24 Mar 2014 15:49:28 -0400 [thread overview]
Message-ID: <53308C48.3070509@linaro.org> (raw)
In-Reply-To: <1394556894-18592-3-git-send-email-tixy@linaro.org>
On 03/11/14 12:54, Jon Medhurst wrote:
> ARM data processing instructions which have a register specified shift
> are defined as UNPREDICTABLE if PC is used for any register, not just
> the shift value as the code was previous assuming. This issue manifests
> on A15 devices as either test case failures or undefined instructions
> aborts.
>
> Reported-by: David Long <dave.long@linaro.org>
> Signed-off-by: Jon Medhurst <tixy@linaro.org>
> ---
> arch/arm/kernel/kprobes-test-arm.c | 25 +++++++++++++------------
> arch/arm/kernel/probes-arm.c | 6 +++---
> 2 files changed, 16 insertions(+), 15 deletions(-)
>
> diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c
> index 87839de..8a7428b 100644
> --- a/arch/arm/kernel/kprobes-test-arm.c
> +++ b/arch/arm/kernel/kprobes-test-arm.c
> @@ -73,12 +73,9 @@ void kprobe_arm_test_cases(void)
> TEST_RRR( op "lt" s " r11, r",11,VAL1,", r",14,N(val),", asr r",7, 6,"")\
> TEST_RR( op "gt" s " r12, r13" ", r",14,val, ", ror r",14,7,"")\
> TEST_RR( op "le" s " r14, r",0, val, ", r13" ", lsl r",14,8,"")\
> - TEST_RR( op s " r12, pc" ", r",14,val, ", ror r",14,7,"")\
> - TEST_RR( op s " r14, r",0, val, ", pc" ", lsl r",14,8,"")\
> TEST_R( op "eq" s " r0, r",11,VAL1,", #0xf5") \
> TEST_R( op "ne" s " r11, r",0, VAL1,", #0xf5000000") \
> - TEST_R( op s " r7, r",8, VAL2,", #0x000af000") \
> - TEST( op s " r4, pc" ", #0x00005a00")
The last two lines above confuse me. Can you explain why those needed
to be removed? Is there somehow a shift involved with those instructions?
The rest looked OK to me. I'm omitting it for the sake of brevity.
-dl
next prev parent reply other threads:[~2014-03-24 19:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 16:54 [PATCH 0/3] Fixes for kprobes test issues Jon Medhurst
2014-03-11 16:54 ` [PATCH 1/3] ARM: kprobes: Prevent known test failures stopping other tests running Jon Medhurst
2014-03-24 15:18 ` David Long
2014-03-24 16:49 ` Jon Medhurst (Tixy)
2014-03-24 16:56 ` Russell King - ARM Linux
2014-03-24 18:34 ` David Long
2014-03-25 14:02 ` Russell King - ARM Linux
2014-03-25 14:08 ` David Long
2014-03-25 14:20 ` Jon Medhurst (Tixy)
2014-03-11 16:54 ` [PATCH 2/3] ARM: kprobes: Disallow instructions with PC and register specified shift Jon Medhurst
2014-03-24 19:49 ` David Long [this message]
2014-03-25 12:51 ` Jon Medhurst (Tixy)
2014-03-11 16:54 ` [PATCH 3/3] ARM: kprobes: Fix test code compilation errors for ARMv4 targets Jon Medhurst
2014-03-25 13:27 ` David Long
2014-03-25 13:42 ` Arnd Bergmann
2014-03-25 14:54 ` Jon Medhurst (Tixy)
2014-03-25 15:17 ` Arnd Bergmann
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=53308C48.3070509@linaro.org \
--to=dave.long@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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).