Linux Audio

Check our new training course

Loading...
v6.13.7
 1// SPDX-License-Identifier: GPL-2.0
 
 
 2#include <linux/bpf.h>
 3#include <bpf/bpf_helpers.h>
 4#include <bpf/bpf_tracing.h>
 5
 6SEC("fentry/bpf_modify_return_test")
 7int BPF_PROG(fentry_test, int a, int *b)
 8{
 9	return 0;
10}
11
12SEC("fmod_ret/bpf_modify_return_test")
13int BPF_PROG(fmod_ret_test, int a, int *b, int ret)
14{
15	return 0;
16}
17
18SEC("fexit/bpf_modify_return_test")
19int BPF_PROG(fexit_test, int a, int *b, int ret)
20{
21	return 0;
22}
23
24char _license[] SEC("license") = "GPL";
v5.9
 1// SPDX-License-Identifier: GPL-2.0
 2#include <stdbool.h>
 3#include <stddef.h>
 4#include <linux/bpf.h>
 5#include <bpf/bpf_helpers.h>
 6#include <bpf/bpf_tracing.h>
 7
 8struct task_struct;
 
 
 
 
 9
10SEC("fentry/__set_task_comm")
11int BPF_PROG(prog1, struct task_struct *tsk, const char *buf, bool exec)
12{
13	return 0;
14}
15
16SEC("fexit/__set_task_comm")
17int BPF_PROG(prog2, struct task_struct *tsk, const char *buf, bool exec)
18{
19	return 0;
20}
21
22char _license[] SEC("license") = "GPL";