Fwd: how to check the hardware support of XN/XI bit support on ARM/MIPS platform
Russell King - ARM Linux
linux at arm.linux.org.uk
Tue Jan 8 09:25:31 EST 2013
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.
More information about the linux-arm-kernel
mailing list