net: convert rawv6, ieee802154, phonet and tls getsockopt to sockopt_t
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected] change-id 20260715-getsockopt_phase4-180209cfc60aVersions newest first
- v4 Latest7 patches 0 repliesApplied 7/7
- v37 patches 11 repliesSuperseded
- v27 patches 7 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 7 patches | 5 replies | Superseded |
Changes in v4 from the cover letter
- In the selftest, check the return value of socket(2) (Sashiko)
- Drop ieee802154 and phonet selftest cases; their CONFIGs are absent
in NIPA (Jakub)
- Link to v3: https://patch.msgid.link/[email protected]
Patches in v4 All 7 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | ipv6: raw: drop unused level argument from do_rawv6_getsockoptnet/ | +3 | 0 replies | Applied |
| 2/7 | ipv6: raw: convert do_rawv6_getsockopt to sockopt_tnet/ | +20 | 0 replies | Applied |
| 3/7 | ieee802154: convert dgram getsockopt to sockopt_tnet/ | +26 | 0 replies | Applied |
| 4/7 | phonet: pep: do not write beyond optlen in getsockoptnet/ | +1 | 0 replies | Applied |
| 5/7 | phonet: pep: convert getsockopt to sockopt_tnet/ | +26 | 0 replies | Applied |
| 6/7 | tls: convert getsockopt to sockopt_tnet/ | +38 | 0 replies | Applied |
| 7/7 | selftests: net: getsockopt_iter: cover rawv6 and tlstools/ | +239 | 0 replies | Applied |
Reviews trailers per patch
All 7 patches have a Reviewed-by or Acked-by.
| Patch | Joe Damato | Stanislav Fomichev | Rémi Denis-Courmont | Sabrina Dubroca |
|---|---|---|---|---|
| 1/7 | R-b | A-b | ||
| 2/7 | R-b | A-b | ||
| 3/7 | R-b | A-b | ||
| 4/7 | R-b | A-b | A-b | |
| 5/7 | R-b | A-b | A-b | |
| 6/7 | R-b | A-b | R-b | |
| 7/7 | R-b | A-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH net-next v4 0/7] net: convert rawv6, ieee802154, phonet and tls getsockopt to sockopt_t
Now that sockopt_init_user() was already merged, builds a user-backed sockopt_t from the __user pair. A getsockopt leaf can then take a sockopt_t behind a thin __user wrapper: the wrapper builds it, calls the leaf, and writes the length back to optlen. The leaf copies with copy_to_iter() instead of copy_to_user().
Convert four more leaves the way udp and raw already were: ipv6 raw (do_rawv6_getsockopt), ieee802154 dgram, phonet pep, and tls (do_tls_getsockopt and its per-option helpers).
Converting phonet surfaced a pre-existing bug: pep_getsockopt() clamps the length it reports but writes a full int with put_user(), overrunning an optval buffer shorter than sizeof(int). It is fixed in its own patch, with a Fixes: tag, before the phonet conversion, so it can be backported alone.
The last patch adds getsockopt_iter selftest fixtures for rawv6, ieee802154, phonet and tls, checking the returned length and errno across exact, oversized and short buffers, an unknown optname and a bad level.
For full motivation about these changes, please check the initial thread at link
https://lore.kernel.org/all/[email protected]/#t
---
Changes in v4:
- In the selftest, check the return value of socket(2) (Sashiko)
- Drop ieee802154 and phonet selftest cases; their CONFIGs are absent
in NIPA (Jakub)
- Link to v3: https://patch.msgid.link/[email protected]
Changes in v3:
- min_t() -> umin() on ieee802154/rawv6 (Joe)
- Link to v2: https://patch.msgid.link/[email protected]
Changes in v2:
- Replace min_t() by umin() (David)
- Link to v1: https://patch.msgid.link/[email protected]
---
Breno Leitao (7):
ipv6: raw: drop unused level argument from do_rawv6_getsockopt
ipv6: raw: convert do_rawv6_getsockopt to sockopt_t
ieee802154: convert dgram getsockopt to sockopt_t
phonet: pep: do not write beyond optlen in getsockopt
phonet: pep: convert getsockopt to sockopt_t
tls: convert getsockopt to sockopt_t
selftests: net: getsockopt_iter: cover rawv6 and tls
net/ieee802154/socket.c | 38 ++-- net/ipv6/raw.c | 29 +++- net/phonet/pep.c | 36 ++-- net/tls/tls_main.c | 80 ++++----- tools/testing/selftests/net/getsockopt_iter.c | 239 ++++++++++++++++++++++++++ 5 files changed, 349 insertions(+), 73 deletions(-)
---
base-commit: f6f3b36c15ed44de1fbb44e645e4fae8c4a4453e
change-id: 20260715-getsockopt_phase4-180209cfc60a
Best regards,
Signature · 1 line
Breno Leitao <[email protected]>