Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/6] net: convert atm/xdp/af_iucv/l2tp_ppp/rxrpc/tipc to getsockopt_iter
@ 2026-05-13 12:34 Breno Leitao
  2026-05-13 12:34 ` [PATCH net-next 1/6] atm: convert " Breno Leitao
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Breno Leitao @ 2026-05-13 12:34 UTC (permalink / raw)
  To: Chas Williams, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman, Magnus Karlsson, Maciej Fijalkowski,
	Stanislav Fomichev, Alexei Starovoitov, Daniel Borkmann,
	Jesper Dangaard Brouer, John Fastabend, Jon Maloy,
	Alexandra Winter, Thorsten Winkler, James Chapman, David Howells,
	Marc Dionne, David Heidelberg, Samuel Ortiz
  Cc: linux-atm-general, netdev, linux-kernel, bpf, tipc-discussion,
	linux-s390, linux-afs, oe-linux-nfc, Breno Leitao, kernel-team

This series continues the conversion of the remaining proto_ops getsockopt
callbacks to the new getsockopt_iter callback introduced in commit 67fab22a7adc
("net: add getsockopt_iter callback to proto_ops").

The new callback takes a sockopt_t — a type-safe wrapper around iov_iter
plus an optlen field — instead of raw __user pointers. This:

    - Replaces (char __user *optval, int __user *optlen) with sockopt_t *opt
    - Reads the input buffer size from opt->optlen instead of get_user()
    - Writes the option value via copy_to_iter() instead of copy_to_user()
    - Reports the returned length via opt->optlen instead of put_user(),
      independently of the bytes copied through the iter

Each conversion is a behaviour-preserving and code-style-preserving refactor;
no big changes being introduced, even when the code looks weird.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
Breno Leitao (6):
      atm: convert to getsockopt_iter
      xdp: convert to getsockopt_iter
      af_iucv: convert to getsockopt_iter
      l2tp: ppp: convert to getsockopt_iter
      rxrpc: convert to getsockopt_iter
      tipc: convert to getsockopt_iter

 net/atm/common.c     | 18 +++++++++++-------
 net/atm/common.h     |  2 +-
 net/atm/pvc.c        |  6 +++---
 net/atm/svc.c        | 15 +++++++--------
 net/iucv/af_iucv.c   | 14 ++++++--------
 net/l2tp/l2tp_ppp.c  | 18 ++++++++----------
 net/rxrpc/af_rxrpc.c | 16 +++++++++-------
 net/tipc/socket.c    | 31 ++++++++++++++++---------------
 net/xdp/xsk.c        | 24 +++++++++++-------------
 9 files changed, 72 insertions(+), 72 deletions(-)
---
base-commit: afb06186b0a5f3ff659cfd97421660c95bbde3be
change-id: 20260513-getsock_four-063e6a724555

Best regards,
--  
Breno Leitao <leitao@debian.org>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-05-13 15:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13 12:34 [PATCH net-next 0/6] net: convert atm/xdp/af_iucv/l2tp_ppp/rxrpc/tipc to getsockopt_iter Breno Leitao
2026-05-13 12:34 ` [PATCH net-next 1/6] atm: convert " Breno Leitao
2026-05-13 15:29   ` Stanislav Fomichev
2026-05-13 12:34 ` [PATCH net-next 2/6] xdp: " Breno Leitao
2026-05-13 15:30   ` Stanislav Fomichev
2026-05-13 12:34 ` [PATCH net-next 3/6] af_iucv: " Breno Leitao
2026-05-13 15:30   ` Stanislav Fomichev
2026-05-13 12:34 ` [PATCH net-next 4/6] l2tp: ppp: " Breno Leitao
2026-05-13 15:32   ` Stanislav Fomichev
2026-05-13 12:34 ` [PATCH net-next 5/6] rxrpc: " Breno Leitao
2026-05-13 15:33   ` Stanislav Fomichev
2026-05-13 12:34 ` [PATCH net-next 6/6] tipc: " Breno Leitao
2026-05-13 15:34   ` Stanislav Fomichev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox