Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Jeremy Kerr <jk@codeconstruct.com.au>,
	 Matt Johnston <matt@codeconstruct.com.au>,
	Martin Schiller <ms@dev.tdt.de>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,  Simon Horman <horms@kernel.org>,
	Shuah Khan <shuah@kernel.org>
Cc: linux-x25@vger.kernel.org, linux-kernel@vger.kernel.org,
	 netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	 Breno Leitao <leitao@debian.org>,
	kernel-team@meta.com,  Stanislav Fomichev <sdf@fomichev.me>,
	 Bobby Eshleman <bobbyeshleman@meta.com>
Subject: [PATCH net-next v2 0/5] net: convert four more protocols to getsockopt_iter
Date: Thu, 07 May 2026 03:57:49 -0700	[thread overview]
Message-ID: <20260507-getsock_two-v2-0-5873111d9c12@debian.org> (raw)

Continue the work to convert protocols to the new getsockopt_iter API.

Convert four additional getsockopt implementations to the new
sockopt_t/getsockopt_iter callback:

  - MCTP
  - LLC
  - X.25
  - KCM

These are mechanical, ABI-preserving conversions following the same
pattern as the previously converted protocols (af_packet, can/raw,
af_netlink, af_vsock): the (char __user *optval, int __user *optlen)
pair is replaced with a single sockopt_t *opt that carries the buffer
length on input and the returned size on output, and exposes an iov_iter
for the copy-out path. put_user()/copy_to_user() pairs are replaced with
a single copy_to_iter() per option, and the wrapper in
do_sock_getsockopt() handles writing optlen back to userspace.

I picked these four because each is small and self-contained.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
Changes in v2:
- Fix kdoc as suggested by Jakub.
- Drop the CAN patches; they will be sent separately through the
  linux-can tree.
- Add X.25 and KCM conversions, keeping the series at four protocols.
- Link to v1: https://patch.msgid.link/20260505-getsock_two-v1-0-4cb0738950e0@debian.org

---
Breno Leitao (5):
      mctp: convert to getsockopt_iter
      llc: convert to getsockopt_iter
      x25: convert to getsockopt_iter
      kcm: convert to getsockopt_iter
      selftests: net: getsockopt_iter: cleanup

 net/kcm/kcmsock.c                             |  16 ++--
 net/llc/af_llc.c                              |  18 ++---
 net/mctp/af_mctp.c                            |  10 +--
 net/x25/af_x25.c                              |  16 ++--
 tools/testing/selftests/net/getsockopt_iter.c | 109 +++++++++++++++++++++++---
 5 files changed, 124 insertions(+), 45 deletions(-)
---
base-commit: c1e5127b577c6b88fa48e532616932ae978528d5
change-id: 20260505-getsock_two-abad19643336

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


             reply	other threads:[~2026-05-07 10:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07 10:57 Breno Leitao [this message]
2026-05-07 10:57 ` [PATCH net-next v2 1/5] mctp: convert to getsockopt_iter Breno Leitao
2026-05-07 20:10   ` Adam Young
2026-05-08  8:21     ` Breno Leitao
2026-05-07 10:57 ` [PATCH net-next v2 2/5] llc: " Breno Leitao
2026-05-07 10:57 ` [PATCH net-next v2 3/5] x25: " Breno Leitao
2026-05-07 10:57 ` [PATCH net-next v2 4/5] kcm: " Breno Leitao
2026-05-07 10:57 ` [PATCH net-next v2 5/5] selftests: net: getsockopt_iter: cleanup Breno Leitao
2026-05-10 17:20 ` [PATCH net-next v2 0/5] net: convert four more protocols to getsockopt_iter patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260507-getsock_two-v2-0-5873111d9c12@debian.org \
    --to=leitao@debian.org \
    --cc=bobbyeshleman@meta.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jk@codeconstruct.com.au \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-x25@vger.kernel.org \
    --cc=matt@codeconstruct.com.au \
    --cc=ms@dev.tdt.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox