Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly x86 > Re: Pax, DEP an...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 7 Topic 4561 of 4710
Post > Topic >>

Re: Pax, DEP and Jumping into middle of instructions

by Terje Mathisen <spamtrap@[EMAIL PROTECTED] > Mar 11, 2008 at 07:30 AM

Tim Roberts wrote:
> tony  <spamtrap@[EMAIL PROTECTED]
> wrote:
>> Does the technique of jumping into the middle of instruction
>> compatible with security systems like Pax in Linux and Data Execution
>> prevention (DEP) in Windows XP SP2? I mean i am not clear that when
>> the program jumps into the middle of instruction, does it executes
>>from data area or code area?
> 
> There is nothing magical about the beginning and ending of an
instruction.
> It's just a sequence of bytes that the CPU interprets.  When you make a
> jump, the CPU doesn't know or care whether it is the first byte of an
> instruction.  It will just load and execute it.

Architecturally it cannot care, in reality (performance-wise) it can:

Jumping into the middle (of a previously executed) opcode will flush the 
information that was cached during the previous pass, i.e. things like 
instruction boundaries on a Pentium, or the trace cache on a P4.

You are of course perfectly right that it has to work, there's no 
alignment requirements for x86 opcode bytes like there is on most RISC 
cpus (aligned 16 or 32-bit opcodes).

Terje

-- 
- <Terje.Mathisen@[EMAIL PROTECTED]
>
"almost all programming can be viewed as an exercise in caching"
 




 7 Posts in Topic:
Pax, DEP and Jumping into middle of instructions
tony <spamtrap@[EMAIL  2008-03-08 17:27:46 
Re: Pax, DEP and Jumping into middle of instructions
"Alexei A. Frounze&q  2008-03-08 21:17:54 
Re: Pax, DEP and Jumping into middle of instructions
Phat Sam <spamtrap@[E  2008-03-09 09:33:33 
Re: Pax, DEP and Jumping into middle of instructions
Tim Roberts <spamtrap  2008-03-11 05:23:45 
Re: Pax, DEP and Jumping into middle of instructions
Terje Mathisen <spamt  2008-03-11 07:30:35 
Re: Pax, DEP and Jumping into middle of instructions
Robert Redelmeier <red  2008-03-11 10:50:27 
Re: Pax, DEP and Jumping into middle of instructions
Jerry Coffin <spamtra  2008-03-11 07:44:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 19:25:10 CDT 2008.