Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at master 41 lines 607 B view raw
1// SPDX-License-Identifier: GPL-2.0 2#include "vmlinux.h" 3#include <bpf/bpf_helpers.h> 4#include <bpf/bpf_tracing.h> 5 6char _license[] SEC("license") = "GPL"; 7 8#if defined(__TARGET_ARCH_x86) 9SEC("kprobe") 10int kprobe_write_ctx(struct pt_regs *ctx) 11{ 12 ctx->ax = 0; 13 return 0; 14} 15 16SEC("kprobe.multi") 17int kprobe_multi_write_ctx(struct pt_regs *ctx) 18{ 19 ctx->ax = 0; 20 return 0; 21} 22 23SEC("?kprobe") 24int kprobe_dummy(struct pt_regs *regs) 25{ 26 return 0; 27} 28 29SEC("?freplace") 30int freplace_kprobe(struct pt_regs *regs) 31{ 32 regs->di = 0; 33 return 0; 34} 35 36SEC("?fentry/bpf_fentry_test1") 37int BPF_PROG(fentry) 38{ 39 return 0; 40} 41#endif