From: viktor.rosendahl@nokia.com (Viktor Rosendahl)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Fix ldrd/strd emulation for kprobes/ARM
Date: Wed, 30 Mar 2011 17:09:43 +0300 [thread overview]
Message-ID: <4D9339A7.30606@nokia.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1103291235380.11889@xanadu.home>
On 03/29/2011 07:55 PM, ext Nicolas Pitre wrote:
>
> Sorry, I meant r15-indexed with a write back.
>
OK, I guess it was kind of implicit in your message but I missed it.
>> Now, I admit that it's possible that somewhere beyond the horizon of my
>> understanding there is some good reason to do two LDRs into adjacent registers
>> from adjacent memory addresses, instead of merging them into one LDRD.
>
> In this case I suspect that the loaded values were pushed to the literal
> pool, and it is hard for the compiler to ensure the placement is always
> 64-bit aligned.
>
I guess you are right, I missed that LDRD/STRD needs to be double word
aligned for the older alignment models. In the ARMv7 model, word
alignment is enough.
>> BTW, in my kernel, LDR indexed by r15 is a really common instruction at the
>> very beginning of functions. I am not sure why; it could have something to do
>> with the fact that the kernel is compiled without frame pointers.
>
> No, it's all about literal pool usage.
Yes, of course it's the literals. I was silly to think otherwise :)
>
> But nowhere will you find pc-indexed addressing with a writeback.
> That's one of the cases I think should be rejected upfront instead of
> evaluating this possibility which is likely to never happen in practice
> each time the instruction is emulated.
>
Currently, we are not checking for that case at all, so the only missing
part would be to modify the decoding logic. I just sent a patch for that.
best regards,
Viktor
next prev parent reply other threads:[~2011-03-30 14:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 17:01 [PATCH] kprobes/arm: fix emulation of LDR/STR instruction when Rn == PC Viktor Rosendahl
2011-03-25 21:19 ` Tixy
2011-03-28 15:56 ` [PATCH] Fix ldrd/strd emulation for kprobes/ARM Viktor Rosendahl
2011-03-28 22:39 ` Nicolas Pitre
2011-03-29 11:26 ` Viktor Rosendahl
2011-03-29 16:55 ` Nicolas Pitre
2011-03-29 18:31 ` Russell King - ARM Linux
2011-03-29 18:44 ` Nicolas Pitre
2011-03-30 13:42 ` [PATCH] Reject kprobes when Rn==15 and writeback is set Viktor Rosendahl
2011-03-30 15:52 ` Tixy
2011-03-30 16:46 ` Viktor Rosendahl
2011-03-30 17:20 ` Tixy
2011-03-30 17:59 ` Nicolas Pitre
2011-03-30 19:39 ` Tixy
2011-03-30 20:48 ` Nicolas Pitre
2011-03-30 14:09 ` Viktor Rosendahl [this message]
2011-03-29 12:55 ` [PATCH] Fix ldrd/strd emulation for kprobes/ARM Tixy
2011-03-29 13:46 ` Viktor Rosendahl
2011-03-29 14:03 ` Tixy
2011-03-29 17:07 ` Nicolas Pitre
2011-03-28 16:27 ` [PATCH] kprobes/arm: fix emulation of LDR/STR instruction when Rn == PC Viktor Rosendahl
2011-03-29 9:12 ` Tixy
2011-03-26 2:03 ` Nicolas Pitre
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=4D9339A7.30606@nokia.com \
--to=viktor.rosendahl@nokia.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.