aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/sched-migration.py
diff options
context:
space:
mode:
authorSargun Dhillon <[email protected]>2016-07-25 12:55:02 +0000
committerDavid S. Miller <[email protected]>2016-07-26 01:07:48 +0000
commitcf9b1199de27ece1eafacf165933df10f0314232 (patch)
tree17cb747b81a9fce3a7052efc639bbb83488df191 /tools/perf/scripts/python/sched-migration.py
parentbpf: Add bpf_probe_write_user BPF helper to be called in tracers (diff)
downloadkernel-cf9b1199de27ece1eafacf165933df10f0314232.tar.gz
kernel-cf9b1199de27ece1eafacf165933df10f0314232.zip
samples/bpf: Add test/example of using bpf_probe_write_user bpf helper
This example shows using a kprobe to act as a dnat mechanism to divert traffic for arbitrary endpoints. It rewrite the arguments to a syscall while they're still in userspace, and before the syscall has a chance to copy the argument into kernel space. Although this is an example, it also acts as a test because the mapped address is 255.255.255.255:555 -> real address, and that's not a legal address to connect to. If the helper is broken, the example will fail on the intermediate steps, as well as the final step to verify the rewrite of userspace memory succeeded. Signed-off-by: Sargun Dhillon <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Daniel Borkmann <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions