$ cp /etc/mkinitcpio.d/linux.preset /etc/mkinitcpio.d/${feature}.preset
# update ${feature}.preset
# set ALL_kver field to kernel version
# set default_image field to /path/to/${feature}.img
System call number and return value
Arch/ABI Instruction System Ret Ret Error Notes
call # val val2
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
$ echo global > /sys/kernel/debug/tracing/trace_clock
$ echo 'p:kprobes/tcp_reset tcp_reset port=+12(%di):u16 dst=+0(%di):u32 state=+18(%di):u8' >> /sys/kernel/debug/tracing/kprobe_events
$ echo 1 > /sys/kernel/debug/tracing/events/kprobes/tcp_reset/enable
$ echo 'p:kprobes/tcp_retransmit tcp_retransmit_skb port=+12(%di):u16 dst=+0(%di):u32 state=+18(%di):u8' >> /sys/kernel/debug/tracing/kprobe_events
$ echo 1 > /sys/kernel/debug/tracing/events/kprobes/tcp_retransmit/enable
bpf_trace_printk
is defined in bpf_helpers.h
which is not distributed with linux kernel.
When compile BPF programs, you may occur following warning:
foo.c:4:5: warning: implicit declaration of function 'bpf_trace_printk' is invalid in C99 [-Wimplicit-function-declaration]
bpf_trace_printk(msg, sizeof(msg));
^
1 warning generated.
$ apt-get source linux
NewerOlder