mirror-linux/include
Breno Leitao 67fab22a7a net: add getsockopt_iter callback to proto_ops
Add a new getsockopt_iter callback to struct proto_ops that uses
sockopt_t, a type-safe wrapper around iov_iter. This provides a clean
interface for socket option operations that works with both user and
kernel buffers.

The sockopt_t type encapsulates an iov_iter and an optlen field.

The optlen field, although not suggested by Linus, serves as both input
(buffer size) and output (returned data size), allowing callbacks to
return random values independent of the bytes written via
copy_to_iter(), so, keep it separated from iov_iter.count.

This is preparatory work for removing the SOL_SOCKET level restriction
from io_uring getsockopt operations.

Keep in mind that both iter_out and iter_in always point to the same
data at all times, and we just have two of them to make the callback
implementation sane.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Breno Leitao <leitao@debian.org>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20260408-getsockopt-v3-1-061bb9cb355d@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-13 14:56:28 -07:00
..
acpi
asm-generic
clocksource
crypto crypto: algif_aead - Revert to operating out-of-place 2026-03-31 17:11:47 +09:00
cxl
drm
dt-bindings reset: spacemit: k3: Decouple composite reset lines 2026-03-23 12:25:47 +01:00
hyperv mshv: Fix infinite fault loop on permission-denied GPA intercepts 2026-04-04 05:25:53 +00:00
keys
kunit
kvm
linux net: add getsockopt_iter callback to proto_ops 2026-04-13 14:56:28 -07:00
math-emu
media
memory
misc
net bluetooth-next pull request for net-next: 2026-04-13 14:26:03 -07:00
pcmcia
ras
rdma
rv
scsi
soc
sound ASoC: SDCA: remove the max count of initialization table 2026-03-25 12:17:43 +00:00
target
trace Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-04-09 13:20:59 -07:00
uapi net: bridge: add stp_mode attribute for STP mode selection 2026-04-10 15:52:24 -07:00
ufs
vdso
video
xen
Kbuild