selftests/bpf: Fix erroneous bitmask operation
[platform/kernel/linux-rpi.git] / tools / testing / selftests / bpf / progs / core_kern_overflow.c
1 // SPDX-License-Identifier: GPL-2.0
2 #include "vmlinux.h"
3
4 #include <bpf/bpf_helpers.h>
5 #include <bpf/bpf_tracing.h>
6 #include <bpf/bpf_core_read.h>
7
8 typedef int (*func_proto_typedef)(long);
9 typedef int (*func_proto_typedef_nested1)(func_proto_typedef);
10 typedef int (*func_proto_typedef_nested2)(func_proto_typedef_nested1);
11
12 int proto_out;
13
14 SEC("raw_tracepoint/sys_enter")
15 int core_relo_proto(void *ctx)
16 {
17         proto_out = bpf_core_type_exists(func_proto_typedef_nested2);
18
19         return 0;
20 }
21
22 char LICENSE[] SEC("license") = "GPL";