Re: [PATCH net v2] net/socket: remove unused do_sock_{set,get}sockopt() exports
From: Jakub Kicinski
Date: Sat Aug 22 2026 - 15:40:17 EST
On Fri, 21 Aug 2026 01:28:32 -0700 Breno Leitao wrote:
> do_sock_setsockopt() and do_sock_getsockopt() have been exported since
> they were split out of the syscall handlers for io_uring to reuse.
>
> io_uring is the only caller outside net/socket.c, and it is never
> modular: cmd_net.o is built under obj-$(CONFIG_NET), and both CONFIG_NET
> and CONFIG_IO_URING are bool. The declarations in <net/sock.h> are all
> it needs, so no module has ever been able to use these exports.
FTR I'd prefer this export (or something along these lines) to having
to add individual helpers for every sockopt for in-kernel networking
socket users. Maybe other maintainers disagree.