[lkml]   [2019]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 08/15] x86/alternatives: Teach text_poke_bp() to emulate instructions
On Tue, Jun 11, 2019 at 02:34:02PM +0200, Peter Zijlstra wrote:

> Bugger, this isn't right. It'll jump to the beginning of the trampoline,
> even if it is multiple instructions in, which would lead to executing
> instructions twice, which would be BAD.
> _maybe_, depending on what the slot looks like, we could do something
> like:
> offset = regs->ip - (unsigned long)bp_int3_addr;
> regs->ip = bp_int3_handler + offset;
> That is; jump into the slot at the same offset we hit the INT3, but this
> is quickly getting yuck.

Yeah, that won't work either... it needs something far more complex :/

 \ /
  Last update: 2019-06-11 14:45    [W:0.078 / U:4.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site