diff options
author | 2021-12-16 02:04:29 +0000 | |
---|---|---|
committer | 2022-01-19 13:05:13 -0800 | |
commit | 1080ef5cc0c2c3419dbdd61e441d1e014410824a (patch) | |
tree | 544557b28f5a9e23ab446bcd10cd004d6099db45 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | selftests/bpf: Test bpf_{get,set}_retval behavior with cgroup/sockopt (diff) | |
download | linux-dev-1080ef5cc0c2c3419dbdd61e441d1e014410824a.tar.xz linux-dev-1080ef5cc0c2c3419dbdd61e441d1e014410824a.zip |
selftests/bpf: Update sockopt_sk test to the use bpf_set_retval
The tests would break without this patch, because at one point it calls
getsockopt(fd, SOL_TCP, TCP_ZEROCOPY_RECEIVE, &buf, &optlen)
This getsockopt receives the kernel-set -EINVAL. Prior to this patch
series, the eBPF getsockopt hook's -EPERM would override kernel's
-EINVAL, however, after this patch series, return 0's automatic
-EPERM will not; the eBPF prog has to explicitly bpf_set_retval(-EPERM)
if that is wanted.
I also removed the explicit mentions of EPERM in the comments in the
prog.
Signed-off-by: YiFei Zhu <zhuyifei@google.com>
Reviewed-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/r/4f20b77cb46812dbc2bdcd7e3fa87c7573bde55e.1639619851.git.zhuyifei@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions