linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: taras.kondratiuk@linaro.org (Taras Kondratiuk)
To: linux-arm-kernel@lists.infradead.org
Subject: .align may cause data to be interpreted as instructions
Date: Thu, 17 Oct 2013 21:09:38 +0300	[thread overview]
Message-ID: <526027E2.3000807@linaro.org> (raw)
In-Reply-To: <1382012243.19506.19.camel@linaro1.home>

On 10/17/2013 03:17 PM, Jon Medhurst (Tixy) wrote:
> On Wed, 2013-10-16 at 01:38 +0300, Taras Kondratiuk wrote:
>> - Explicit filling with 0's (.align , 0) fixes the issue, but as a side
>>     effect data @0x4 is interpreted as a single ".word 0xaa000000"
>>     instead of ".byte .byte .short". I'm not sure if there can be any
>>     functional difference because of this.
> 
> After thinking about things overnight, I believe that this is the fix we
> should go with. We want to stick alignment padding between data laid
> down with .byte and .word so it makes sense to explicitly ask the
> toolchain to pad with zeros rather than leaving it the opportunity to
> get confused. (.align in the text section probably means it wants to
> align with nops, but then sees the initial alignment and/or surrounding
> statements look like binary data, not code, and then...)
> 
> I'll send a patch proposing that fix after I've worked out how to test
> it on a big-endian kernel. Or if someone else sends a patch for that
> with a good commit message that explains what's going on I'll happily
> ack that.

I have several fixes for BE Thumb kprobes on top of Ben's series.
".aling , 0" workaround is one of them.
All tests now pass for LE/BE and Thumb/ARM. I will clean up patches and
send them to Ben.

  reply	other threads:[~2013-10-17 18:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 22:38 .align may cause data to be interpreted as instructions Taras Kondratiuk
2013-10-16 11:13 ` Ben Dooks
2013-10-16 16:06   ` Jon Medhurst (Tixy)
2013-10-16 17:03     ` Jon Medhurst (Tixy)
2013-10-16 21:16       ` Taras Kondratiuk
2013-10-16 15:28 ` Jon Medhurst (Tixy)
2013-10-17 12:17 ` Jon Medhurst (Tixy)
2013-10-17 18:09   ` Taras Kondratiuk [this message]
     [not found] <20131016192512.GB21726@localhost.localdomain>
2013-10-16 20:47 ` Taras Kondratiuk
2013-10-16 21:17   ` Måns Rullgård
     [not found] <20131017125533.GD2442@localhost.localdomain>
2013-10-18 11:03 ` Jon Medhurst (Tixy)
2013-10-18 12:36   ` 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=526027E2.3000807@linaro.org \
    --to=taras.kondratiuk@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).