selftests/bpf: Define SYS_NANOSLEEP_KPROBE_NAME for aarch64

attach_probe selftest fails on aarch64 with `failed to create kprobe
'sys_nanosleep+0x0' perf event: No such file or directory`. This is
because, like on several other architectures, nanosleep has a prefix.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Tested-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/bpf/20220404142101.27900-1-iii@linux.ibm.com
This commit is contained in:
Ilya Leoshkevich 2022-04-04 16:21:01 +02:00 committed by Andrii Nakryiko
parent 7224a0737c
commit d298761746

View File

@ -332,6 +332,8 @@ int trigger_module_test_write(int write_sz);
#define SYS_NANOSLEEP_KPROBE_NAME "__x64_sys_nanosleep" #define SYS_NANOSLEEP_KPROBE_NAME "__x64_sys_nanosleep"
#elif defined(__s390x__) #elif defined(__s390x__)
#define SYS_NANOSLEEP_KPROBE_NAME "__s390x_sys_nanosleep" #define SYS_NANOSLEEP_KPROBE_NAME "__s390x_sys_nanosleep"
#elif defined(__aarch64__)
#define SYS_NANOSLEEP_KPROBE_NAME "__arm64_sys_nanosleep"
#else #else
#define SYS_NANOSLEEP_KPROBE_NAME "sys_nanosleep" #define SYS_NANOSLEEP_KPROBE_NAME "sys_nanosleep"
#endif #endif