From: ben.dooks@codethink.co.uk (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/9] ARM: kprobes-test: fix next_instruction()
Date: Fri, 8 Nov 2013 18:37:10 +0000 [thread overview]
Message-ID: <1383935832-20865-8-git-send-email-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <1383935832-20865-1-git-send-email-ben.dooks@codethink.co.uk>
From: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Fix next_instruction() function to correctly swap the instruction
loaded from memory.
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
[ben.dooks at codethink.co.uk: edited commit message as item already fixed]
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
arch/arm/kernel/kprobes-test.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/kernel/kprobes-test.c b/arch/arm/kernel/kprobes-test.c
index d39cd2e..96e3dbc 100644
--- a/arch/arm/kernel/kprobes-test.c
+++ b/arch/arm/kernel/kprobes-test.c
@@ -1329,7 +1329,8 @@ static void test_case_failed(const char *message)
static unsigned long next_instruction(unsigned long pc)
{
#ifdef CONFIG_THUMB2_KERNEL
- if ((pc & 1) && !is_wide_instruction(*(u16 *)(pc - 1)))
+ if ((pc & 1) &&
+ !is_wide_instruction(__mem_to_opcode_thumb16(*(u16 *)(pc - 1))))
return pc + 2;
else
#endif
--
1.8.4.rc3
next prev parent reply other threads:[~2013-11-08 18:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 18:37 [RFC] kprobes/kprobes-test fixes, .inst updates Ben Dooks
2013-11-08 18:37 ` [PATCH 1/9] ARM: fix missed big-endian fix in traps.c Ben Dooks
2013-11-08 18:37 ` [PATCH 2/9] ARM: kprobes: fix instruction fetch order with <asm/opcodes.h> Ben Dooks
2013-11-29 13:01 ` Taras Kondratiuk
2013-11-29 17:55 ` Ben Dooks
2013-11-08 18:37 ` [PATCH 3/9] ARM: kprobes-test: use <asm/opcodes.h> for instruction accesses Ben Dooks
2013-11-08 18:37 ` [PATCH 4/9] ARM: kprobes-test: Use <asm/opcodes.h> for ARM instruction building Ben Dooks
2013-11-29 11:55 ` Taras Kondratiuk
2013-11-08 18:37 ` [PATCH 5/9] ARM: kprobes-test: Use <asm/opcodes.h> for thumb instruction nuilding Ben Dooks
2013-11-08 18:37 ` [PATCH 6/9] ARM: kprobes-test: Workaround GAS .align bug Ben Dooks
2013-11-08 18:37 ` Ben Dooks [this message]
2013-11-08 18:37 ` [PATCH 8/9] ARM: add test for as supporting '.inst' Ben Dooks
2013-11-11 18:16 ` Dave Martin
2013-11-08 18:37 ` [PATCH 9/9] ARM: asm/opcodes.h: use ARM_HAVE_INST to use .inst to build instructions Ben Dooks
2013-11-11 16:18 ` Dave Martin
2013-11-11 18:40 ` Dave Martin
2013-11-29 17:57 ` Taras Kondratiuk
2013-11-29 18:00 ` [RFC] kprobes/kprobes-test fixes, .inst updates Taras Kondratiuk
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=1383935832-20865-8-git-send-email-ben.dooks@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).