xref: /linux/tools/testing/selftests/bpf/progs/struct_ops_arena_attach.c (revision 5a8cd539ac19f7a68e68e1d25ef9ca2ff55b8500)
1*4976cce0SKumar Kartikeya Dwivedi // SPDX-License-Identifier: GPL-2.0
2*4976cce0SKumar Kartikeya Dwivedi /* Copyright (c) 2026 Meta Platforms, Inc. and affiliates. */
3*4976cce0SKumar Kartikeya Dwivedi #include <linux/bpf.h>
4*4976cce0SKumar Kartikeya Dwivedi #include <bpf/bpf_helpers.h>
5*4976cce0SKumar Kartikeya Dwivedi #include <bpf/bpf_tracing.h>
6*4976cce0SKumar Kartikeya Dwivedi 
7*4976cce0SKumar Kartikeya Dwivedi SEC("fentry")
BPF_PROG(fentry_test_arena,unsigned long long * st_ops_ctx)8*4976cce0SKumar Kartikeya Dwivedi int BPF_PROG(fentry_test_arena, unsigned long long *st_ops_ctx)
9*4976cce0SKumar Kartikeya Dwivedi {
10*4976cce0SKumar Kartikeya Dwivedi 	return 0;
11*4976cce0SKumar Kartikeya Dwivedi }
12*4976cce0SKumar Kartikeya Dwivedi 
13*4976cce0SKumar Kartikeya Dwivedi SEC("fexit")
BPF_PROG(fexit_test_arena,unsigned long long * st_ops_ctx,int ret)14*4976cce0SKumar Kartikeya Dwivedi int BPF_PROG(fexit_test_arena, unsigned long long *st_ops_ctx, int ret)
15*4976cce0SKumar Kartikeya Dwivedi {
16*4976cce0SKumar Kartikeya Dwivedi 	return 0;
17*4976cce0SKumar Kartikeya Dwivedi }
18*4976cce0SKumar Kartikeya Dwivedi 
19*4976cce0SKumar Kartikeya Dwivedi SEC("freplace")
freplace_test_arena(unsigned long long * st_ops_ctx)20*4976cce0SKumar Kartikeya Dwivedi int freplace_test_arena(unsigned long long *st_ops_ctx)
21*4976cce0SKumar Kartikeya Dwivedi {
22*4976cce0SKumar Kartikeya Dwivedi 	return 0;
23*4976cce0SKumar Kartikeya Dwivedi }
24*4976cce0SKumar Kartikeya Dwivedi 
25*4976cce0SKumar Kartikeya Dwivedi char _license[] SEC("license") = "GPL";
26