mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
Add the testcase for the jited inline of bpf_get_current_task(). Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20260120070555.233486-3-dongml2@chinatelecom.cn Signed-off-by: Alexei Starovoitov <ast@kernel.org>
21 lines
371 B
C
21 lines
371 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include <vmlinux.h>
|
|
#include <bpf/bpf_helpers.h>
|
|
#include "bpf_misc.h"
|
|
|
|
SEC("fentry/bpf_fentry_test1")
|
|
__success __retval(0)
|
|
__arch_x86_64
|
|
__jited(" addq %gs:{{.*}}, %rax")
|
|
__arch_arm64
|
|
__jited(" mrs x7, SP_EL0")
|
|
int inline_bpf_get_current_task(void)
|
|
{
|
|
bpf_get_current_task();
|
|
|
|
return 0;
|
|
}
|
|
|
|
char _license[] SEC("license") = "GPL";
|