"The instructions that are located at the address to be probed still need
to be executed once they are replaced by a jump, of course, so a 'detour'
buffer is created. The detour buffer emulates an exception that contains
the instructions copied from the probed location, followed by a jump back
to the original execution path."
Doesn't kernel already use[1] some kind of a "detour" buffer to execute
the instructions (at least I remember reading about something similar)?
And isn't this kind of code architecture specific[2], which archs this
patch supports?
[1] Disabling breakpoint, running the instructions and re-enabling the
breakpoint cannot be used because then there's a race-condition with the
other threads, so the instructions are executed from a buffer set aside
for this purpose.
[2] there are some instructions which need "emulation" when run from a
different location due to using data at relative offsets.