aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/bpf/progs/core_kern_overflow.c
blob: f0d5652256baf9bbb15529a7a616586d5bcbda9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// SPDX-License-Identifier: GPL-2.0
#include "vmlinux.h"

#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>

typedef int (*func_proto_typedef)(long);
typedef int (*func_proto_typedef_nested1)(func_proto_typedef);
typedef int (*func_proto_typedef_nested2)(func_proto_typedef_nested1);

int proto_out;

SEC("raw_tracepoint/sys_enter")
int core_relo_proto(void *ctx)
{
	proto_out = bpf_core_type_exists(func_proto_typedef_nested2);

	return 0;
}

char LICENSE[] SEC("license") = "GPL";