1 // SPDX-License-Identifier: GPL-2.0
3 #include <bpf/bpf_helpers.h>
5 struct __bpf_stdout__ {
6 __uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
9 __uint(max_entries, __NR_CPUS__);
10 } __bpf_stdout__ SEC(".maps");
13 ({ const int __len = sizeof(from); \
14 char __from[sizeof(from)] = from; \
15 bpf_perf_event_output(args, &__bpf_stdout__, BPF_F_CURRENT_CPU, \
16 &__from, __len & (sizeof(from) - 1)); })
18 struct syscall_enter_args;
20 SEC("raw_syscalls:sys_enter")
21 int sys_enter(struct syscall_enter_args *args)
23 puts("Hello, world\n");
27 char _license[] SEC("license") = "GPL";