-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
selftests/bpf: fix probe_user test failure with clang build kernel #1837
Conversation
Master branch: e7d5184 |
Master branch: 4c9f093 |
b246cc0
to
5e403c1
Compare
Master branch: c3e8c44 |
5e403c1
to
3880c1d
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=553639 expired. Closing PR. |
clang build kernel failed the selftest probe_user. $ ./test_progs -t probe_user $ ... $ test_probe_user:PASS:get_kprobe_res 0 nsec $ test_probe_user:FAIL:check_kprobe_res wrong kprobe res from probe read: 0.0.0.0:0 $ #94 probe_user:FAIL The test attached to kernel function __sys_connect(). In net/socket.c, we have int __sys_connect(int fd, struct sockaddr __user *uservaddr, int addrlen) { ...... } ... SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr, int, addrlen) { return __sys_connect(fd, uservaddr, addrlen); } The gcc compiler (8.5.0) does not inline __sys_connect() in syscall entry function. But latest clang trunk did the inlining. So the bpf program is not triggered. To make the test more reliable, let us kprobe the syscall entry function instead. Note that x86_64, arm64 and s390 have syscall wrappers and they have to be handled specially. Signed-off-by: Yonghong Song <yhs@fb.com>
Master branch: 72e1781 |
3880c1d
to
7844e15
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=554695 irrelevant now. Closing PR. |
Pull request for series with
subject: selftests/bpf: fix probe_user test failure with clang build kernel
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=553639