diff options
author | Artem Savkov <asavkov@redhat.com> | 2022-08-16 07:52:31 +0200 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2022-08-16 13:30:38 -0700 |
commit | 807662cac66af0dfca60ce1cf784063da6ec2f65 (patch) | |
tree | 0c10af32598354d1096c31422531517933694406 /tools/testing/selftests/bpf/progs/lsm.c | |
parent | 1f235777c3a4ab115162fe7d45b82be534b9ae2e (diff) | |
download | linux-stable-807662cac66af0dfca60ce1cf784063da6ec2f65.tar.gz linux-stable-807662cac66af0dfca60ce1cf784063da6ec2f65.tar.bz2 linux-stable-807662cac66af0dfca60ce1cf784063da6ec2f65.zip |
selftests/bpf: Fix attach point for non-x86 arches in test_progs/lsm
Use SYS_PREFIX macro from bpf_misc.h instead of hard-coded '__x64_'
prefix for sys_setdomainname attach point in lsm test.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220816055231.717006-1-asavkov@redhat.com
Diffstat (limited to 'tools/testing/selftests/bpf/progs/lsm.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/lsm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/progs/lsm.c b/tools/testing/selftests/bpf/progs/lsm.c index 33694ef8acfa..d8d8af623bc2 100644 --- a/tools/testing/selftests/bpf/progs/lsm.c +++ b/tools/testing/selftests/bpf/progs/lsm.c @@ -4,6 +4,7 @@ * Copyright 2020 Google LLC. */ +#include "bpf_misc.h" #include "vmlinux.h" #include <bpf/bpf_helpers.h> #include <bpf/bpf_tracing.h> @@ -160,7 +161,7 @@ int BPF_PROG(test_task_free, struct task_struct *task) int copy_test = 0; -SEC("fentry.s/__x64_sys_setdomainname") +SEC("fentry.s/" SYS_PREFIX "sys_setdomainname") int BPF_PROG(test_sys_setdomainname, struct pt_regs *regs) { void *ptr = (void *)PT_REGS_PARM1(regs); |