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: 1e8611bbdf
("selftests/bpf: add kprobe/uprobe selftests")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
896bcc908a
commit
025c0c0917
|
@ -23,6 +23,8 @@ ssize_t get_base_addr() {
|
|||
|
||||
#ifdef __x86_64__
|
||||
#define SYS_KPROBE_NAME "__x64_sys_nanosleep"
|
||||
#elif defined(__s390x__)
|
||||
#define SYS_KPROBE_NAME "__s390x_sys_nanosleep"
|
||||
#else
|
||||
#define SYS_KPROBE_NAME "sys_nanosleep"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue