linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: Fwd: how to check the hardware support of XN/XI bit support on ARM/MIPS platform
Date: Tue, 8 Jan 2013 14:25:31 +0000	[thread overview]
Message-ID: <20130108142531.GA3931@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CALTRzTknSz4kNB6EE7-jb1NOj5OOc95ZqH9c=rwuN0DoROPvvw@mail.gmail.com>

On Fri, Jan 04, 2013 at 11:32:03AM +0530, Girish garg wrote:
>         char buf[8192];
>         fptr func;
> 
>         /* Put a RETN instruction in the buffer */
>         buf[0] = '\xc3';

If you're going to be poking opcodes into the stack, you need to use
the correct opcodes for the CPU you're using.

You also need to use the correct opcodes (and alignment) for the
instruction set you're using - iow, if you're using ARM or Thumb.

0xc3 on its own is not a valid ARM or Thumb instruction.

      reply	other threads:[~2013-01-08 14:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CALTRzTn_2eaE7vr-tXwGKmO3fGqmif0hdrFEinQjbf6Dx=yHCg@mail.gmail.com>
2013-01-04  6:02 ` Fwd: how to check the hardware support of XN/XI bit support on ARM/MIPS platform Girish garg
2013-01-08 14:25   ` Russell King - ARM Linux [this message]

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=20130108142531.GA3931@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.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).