From: Breno Leitao <leitao@debian.org>
To: Robin van der Gracht <robin@protonic.nl>,
Oleksij Rempel <o.rempel@pengutronix.de>,
kernel@pengutronix.de, Oliver Hartkopp <socketcan@hartkopp.net>,
Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com, Breno Leitao <leitao@debian.org>
Subject: [PATCH net-next 0/2] net: convert remaining CAN protocols to getsockopt_iter
Date: Thu, 07 May 2026 02:34:46 -0700 [thread overview]
Message-ID: <20260507-getsock_two_can-v1-0-3c2ae9edfadc@debian.org> (raw)
Continue the conversion of socket protocols to the new getsockopt_iter
API by covering the two remaining CAN implementations:
- isotp (CAN ISO-TP)
- j1939 (SAE J1939)
With these, all CAN protocols that expose a getsockopt callback (raw,
isotp, j1939) now use .getsockopt_iter; raw was converted as part of
an earlier series.
These are mechanical, ABI-preserving conversions following the same
pattern as 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.
- The wrapper in do_sock_getsockopt() handles writing optlen back to
userspace.
No functional or ABI change is intended.
For more context about the motivation for this change, please check
commit 67fab22a7ad ("net: add getsockopt_iter callback to proto_ops")
---
Breno Leitao (2):
can: j1939: convert to getsockopt_iter
can: isotp: convert to getsockopt_iter
net/can/isotp.c | 12 +++++-------
net/can/j1939/socket.c | 21 +++++++++++++--------
2 files changed, 18 insertions(+), 15 deletions(-)
---
base-commit: dacf281771a9aed1a723b196120a0de8637910b9
change-id: 20260507-getsock_two_can-5d3604b1982f
Best regards,
--
Breno Leitao <leitao@debian.org>
next reply other threads:[~2026-05-07 9:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 9:34 Breno Leitao [this message]
2026-05-07 9:34 ` [PATCH net-next 1/2] can: j1939: convert to getsockopt_iter Breno Leitao
2026-05-11 4:21 ` Oleksij Rempel
2026-05-07 9:34 ` [PATCH net-next 2/2] can: isotp: " Breno Leitao
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_can-v1-0-3c2ae9edfadc@debian.org \
--to=leitao@debian.org \
--cc=kernel-team@meta.com \
--cc=kernel@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=o.rempel@pengutronix.de \
--cc=robin@protonic.nl \
--cc=socketcan@hartkopp.net \
/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