]> git.baikalelectronics.ru Git - kernel.git/commit
samples/bpf: fix kprobe attachment issue on x64
authorYonghong Song <yhs@fb.com>
Mon, 30 Apr 2018 02:27:48 +0000 (19:27 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 30 Apr 2018 03:36:53 +0000 (20:36 -0700)
commitba6d6bd4af6c8f57f7a8d22d82ea2bf579f445a9
treebdd6bbae3a8616d5a53f4299932aceecf61f5921
parente02bb090aa33b50aaf1d55970526604929691f4d
samples/bpf: fix kprobe attachment issue on x64

Commit e1abdf153a7c ("syscalls/core, syscalls/x86: Rename
struct pt_regs-based sys_*() to __x64_sys_*()") renamed a lot
of syscall function sys_*() to __x64_sys_*().
This caused several kprobe based samples/bpf tests failing.

This patch fixed the problem in bpf_load.c.
For x86_64 architecture, function name __x64_sys_*() will be
first used for kprobe event creation. If the creation is successful,
it will be used. Otherwise, function name sys_*() will be used
for kprobe event creation.

Fixes: e1abdf153a7c ("syscalls/core, syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*()")
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
samples/bpf/bpf_load.c