linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ben.dooks@codethink.co.uk (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: kprobes-test: use <asm/opcodes.h>
Date: Wed, 31 Jul 2013 20:38:54 +0100	[thread overview]
Message-ID: <51F967CE.4030704@codethink.co.uk> (raw)
In-Reply-To: <1375085237.3521.7.camel@linaro1.home>

On 29/07/13 09:07, Jon Medhurst (Tixy) wrote:
> On Thu, 2013-07-25 at 22:08 +0100, Ben Dooks wrote:
>> Ensure we read instructions in the correct endian-ness by using
>> the<asm/opcodes.h>  helper to transform them as necessary.
>>
>> Signed-off-by: Ben Dooks<ben.dooks@codethink.co.uk>
>> ---
>>   arch/arm/kernel/kprobes-test.c |    9 ++++-----
>>   1 file changed, 4 insertions(+), 5 deletions(-)
>>
>> diff --git a/arch/arm/kernel/kprobes-test.c b/arch/arm/kernel/kprobes-test.c
>> index 0cd63d0..6cfa04d 100644
>> --- a/arch/arm/kernel/kprobes-test.c
>> +++ b/arch/arm/kernel/kprobes-test.c
>> @@ -1374,13 +1374,13 @@ static uintptr_t __used kprobes_test_case_start(const char *title, void *stack)
>>
>>   	if (test_case_is_thumb) {
>>   		u16 *p = (u16 *)(test_code&  ~1);
>> -		current_instruction = p[0];
>> +		current_instruction = __mem_to_opcode_thumb16(p[0]);
>>   		if (is_wide_instruction(current_instruction)) {
>> -			current_instruction<<= 16;
>> -			current_instruction |= p[1];
>> +			u16 instr2 = __mem_to_opcode_thumb16(p[1]);
>> +			current_instruction = ___asm_opcode_thumb32_compose(current_instruction, instr2);
>
> Should it not be __opcode_thumb32_compose instead of
> ___asm_opcode_thumb32_compose ?

Ok, will change for the next version.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

  reply	other threads:[~2013-07-31 19:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25 21:08 fyi - kprobes testing patches Ben Dooks
2013-07-25 21:08 ` [PATCH 1/4] ARM: kprobes: fix instruction fetch order with <asm/opcodes.h> Ben Dooks
2013-07-29  8:01   ` Jon Medhurst (Tixy)
2013-07-31 19:43     ` Ben Dooks
2013-08-02 13:57       ` Dave Martin
2013-08-02 13:58         ` Ben Dooks
2013-08-02 14:03       ` Dave Martin
2013-07-25 21:08 ` [PATCH 2/4] ARM: kprobes, change arm test to .instr Ben Dooks
2013-07-25 21:08 ` [PATCH 3/4] ARM: kprobes-test: use <asm/opcodes.h> Ben Dooks
2013-07-29  8:07   ` Jon Medhurst (Tixy)
2013-07-31 19:38     ` Ben Dooks [this message]
2013-07-25 21:08 ` [PATCH 4/4] ARM: kprobes-test: move to using a pointer to the title text Ben Dooks
2013-07-26 14:02   ` Dave Martin
2013-07-26 14:08     ` Ben Dooks
2013-07-26 10:52 ` fyi - kprobes testing patches Ben Dooks

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=51F967CE.4030704@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --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).