aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorPeter Zijlstra <[email protected]>2023-01-23 20:59:17 +0000
committerIngo Molnar <[email protected]>2023-01-31 14:05:31 +0000
commitac0ee0a9560c97fa5fe1409e450c2425d4ebd17a (patch)
tree504f81bb70d25dd873e14d74ae5064a043dc8351 /tools/perf/scripts/python/net_dropmonitor.py
parentx86/alternatives: Introduce int3_emulate_jcc() (diff)
downloadkernel-ac0ee0a9560c97fa5fe1409e450c2425d4ebd17a.tar.gz
kernel-ac0ee0a9560c97fa5fe1409e450c2425d4ebd17a.zip
x86/alternatives: Teach text_poke_bp() to patch Jcc.d32 instructions
In order to re-write Jcc.d32 instructions text_poke_bp() needs to be taught about them. The biggest hurdle is that the whole machinery is currently made for 5 byte instructions and extending this would grow struct text_poke_loc which is currently a nice 16 bytes and used in an array. However, since text_poke_loc contains a full copy of the (s32) displacement, it is possible to map the Jcc.d32 2 byte opcodes to Jcc.d8 1 byte opcode for the int3 emulation. This then leaves the replacement bytes; fudge that by only storing the last 5 bytes and adding the rule that 'length == 6' instruction will be prefixed with a 0x0f byte. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Masami Hiramatsu (Google) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions