Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | #include <uapi/linux/ptrace.h> |
| 2 | #include <uapi/linux/bpf.h> |
| 3 | #include <linux/version.h> |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 4 | #include <bpf/bpf_helpers.h> |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 5 | |
| 6 | SEC("kprobe/open_ctree") |
| 7 | int bpf_prog1(struct pt_regs *ctx) |
| 8 | { |
| 9 | unsigned long rc = -12; |
| 10 | |
| 11 | bpf_override_return(ctx, rc); |
| 12 | return 0; |
| 13 | } |
| 14 | |
| 15 | char _license[] SEC("license") = "GPL"; |
| 16 | u32 _version SEC("version") = LINUX_VERSION_CODE; |