xref: /linux/tools/testing/selftests/bpf/progs/verifier_jit_inline.c (revision c17ee635fd3a482b2ad2bf5e269755c2eae5f25e)
1*4fca9509SMenglong Dong // SPDX-License-Identifier: GPL-2.0
2*4fca9509SMenglong Dong 
3*4fca9509SMenglong Dong #include <vmlinux.h>
4*4fca9509SMenglong Dong #include <bpf/bpf_helpers.h>
5*4fca9509SMenglong Dong #include "bpf_misc.h"
6*4fca9509SMenglong Dong 
7*4fca9509SMenglong Dong SEC("fentry/bpf_fentry_test1")
8*4fca9509SMenglong Dong __success __retval(0)
9*4fca9509SMenglong Dong __arch_x86_64
10*4fca9509SMenglong Dong __jited("	addq	%gs:{{.*}}, %rax")
11*4fca9509SMenglong Dong __arch_arm64
12*4fca9509SMenglong Dong __jited("	mrs	x7, SP_EL0")
13*4fca9509SMenglong Dong int inline_bpf_get_current_task(void)
14*4fca9509SMenglong Dong {
15*4fca9509SMenglong Dong 	bpf_get_current_task();
16*4fca9509SMenglong Dong 
17*4fca9509SMenglong Dong 	return 0;
18*4fca9509SMenglong Dong }
19*4fca9509SMenglong Dong 
20*4fca9509SMenglong Dong char _license[] SEC("license") = "GPL";
21