bpf: handle another corner case in getsockopt
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 8 repliesIn review 2 of 6 applied
Patches in v1 2 of 6 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | bpf: Don't EFAULT for getsockopt with optval=NULLkernel/ | +6 | 0 replies | Applied |
| 2/6 | selftests/bpf: Verify optval=NULL casetools/ tools/ | +40 | 0 replies | Applied |
| 3/6 | bpf: Don't EFAULT for {g,s}setsockopt with wrong optlenkernel/ | +6 | 7 replies | |
| 4/6 | selftests/bpf: Update EFAULT {g,s}etsockopt selfteststools/ | +13 | 0 replies | |
| 5/6 | selftests/bpf: Correctly handle optlen > 4096tools/ tools/ tools/ +3 more | +88 | 0 replies | |
| 6/6 | bpf: Document EFAULT changes for sockoptDocumentation/ | +60 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH bpf-next 0/6] bpf: handle another corner case in getsockopt
Martin reports another case where getsockopt EFAULTs perfectly valid callers. Let's fix it and also replace EFAULT with pr_info_ratelimited. That should hopefully make this place less error prone.
First 2 patches fix the issue with NETLINK_LIST_MEMBERSHIPS and test it.
Second 2 patches replace EFAULT with pr_inro_limited and update the tests.
The remaining patches update documentation and existing selftests to be more gentle with 'optlen > 4096' cases. People might be copy-pasting from there, so let's be more pedantic.
Stanislav Fomichev (6):
bpf: Don't EFAULT for getsockopt with optval=NULL selftests/bpf: Verify optval=NULL case
bpf: Don't EFAULT for {g,s}setsockopt with wrong optlen selftests/bpf: Update EFAULT {g,s}etsockopt selftests selftests/bpf: Correctly handle optlen > 4096
bpf: Document EFAULT changes for sockopt
Documentation/bpf/prog_cgroup_sockopt.rst | 64 +++++++++++++++++-- kernel/bpf/cgroup.c | 17 +++-- .../selftests/bpf/prog_tests/sockopt.c | 42 ++++-------- .../selftests/bpf/prog_tests/sockopt_sk.c | 28 ++++++++ .../progs/cgroup_getset_retval_getsockopt.c | 12 ++++ .../progs/cgroup_getset_retval_setsockopt.c | 16 +++++ .../selftests/bpf/progs/sockopt_inherit.c | 16 ++++- .../selftests/bpf/progs/sockopt_multi.c | 24 ++++++- .../selftests/bpf/progs/sockopt_qos_to_cc.c | 8 ++- .../testing/selftests/bpf/progs/sockopt_sk.c | 33 ++++++++-- 10 files changed, 211 insertions(+), 49 deletions(-)
Signature · 1 line
2.40.0.634.g4ca3ef3211-goog