Commit 025c0c09 authored by Ilya Leoshkevich's avatar Ilya Leoshkevich Committed by Daniel Borkmann

selftests/bpf: fix attach_probe on s390

attach_probe test fails, because it cannot install a kprobe on a
non-existent sys_nanosleep symbol.

Use the correct symbol name for the nanosleep syscall on 64-bit s390.
Don't bother adding one for 31-bit mode, since tests are compiled only
in 64-bit mode.

Fixes: 1e8611bb ("selftests/bpf: add kprobe/uprobe selftests")
Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
Acked-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Acked-by: default avatarAndrii Nakryiko <andriin@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 896bcc90
...@@ -23,6 +23,8 @@ ssize_t get_base_addr() { ...@@ -23,6 +23,8 @@ ssize_t get_base_addr() {
#ifdef __x86_64__ #ifdef __x86_64__
#define SYS_KPROBE_NAME "__x64_sys_nanosleep" #define SYS_KPROBE_NAME "__x64_sys_nanosleep"
#elif defined(__s390x__)
#define SYS_KPROBE_NAME "__s390x_sys_nanosleep"
#else #else
#define SYS_KPROBE_NAME "sys_nanosleep" #define SYS_KPROBE_NAME "sys_nanosleep"
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment