The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH net] net/socket: remove unused do_sock_{set,get}sockopt() exports
@ 2026-08-19 13:15 Breno Leitao
  2026-08-19 14:27 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Breno Leitao @ 2026-08-19 13:15 UTC (permalink / raw)
  To: Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
	David S. Miller, Jakub Kicinski, Simon Horman, Jens Axboe,
	Martin KaFai Lau
  Cc: netdev, linux-kernel, kernel-team, Christoph Hellwig,
	Breno Leitao

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.

Drop the symbol export.

Fixes: 1406245c2945 ("net/socket: Break down __sys_setsockopt")
Fixes: 0b05b0cd78c9 ("net/socket: Break down __sys_getsockopt")
Suggested-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/all/20260819090439.GB9267@lst.de/
Signed-off-by: Breno Leitao <leitao@debian.org>
---
 net/socket.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/socket.c b/net/socket.c
index 63c69a0fa74e1..ba3eca4324e7b 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2371,7 +2371,6 @@ int do_sock_setsockopt(struct socket *sock, bool compat, int level,
 out_put:
 	return err;
 }
-EXPORT_SYMBOL(do_sock_setsockopt);
 
 /* Set a socket option. Because we don't know the option lengths we have
  * to pass the user mode parameter for the protocols to sort out.
@@ -2484,7 +2483,6 @@ int do_sock_getsockopt(struct socket *sock, bool compat, int level,
 
 	return err;
 }
-EXPORT_SYMBOL(do_sock_getsockopt);
 
 /*
  *	Get a socket option. Because we don't know the option lengths we have

---
base-commit: 564973a259ec76f2dad0853420e7034cc43994c4
change-id: 20260819-hch_not_export-908dcceab01f

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


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

* Re: [PATCH net] net/socket: remove unused do_sock_{set,get}sockopt() exports
  2026-08-19 13:15 [PATCH net] net/socket: remove unused do_sock_{set,get}sockopt() exports Breno Leitao
@ 2026-08-19 14:27 ` Christoph Hellwig
  2026-08-19 15:07   ` Breno Leitao
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2026-08-19 14:27 UTC (permalink / raw)
  To: Breno Leitao
  Cc: Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
	David S. Miller, Jakub Kicinski, Simon Horman, Jens Axboe,
	Martin KaFai Lau, netdev, linux-kernel, kernel-team,
	Christoph Hellwig

On Wed, Aug 19, 2026 at 06:15:35AM -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.
> 
> Drop the symbol export.

exports?

Otherwise looks good:


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

* Re: [PATCH net] net/socket: remove unused do_sock_{set,get}sockopt() exports
  2026-08-19 14:27 ` Christoph Hellwig
@ 2026-08-19 15:07   ` Breno Leitao
  0 siblings, 0 replies; 3+ messages in thread
From: Breno Leitao @ 2026-08-19 15:07 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
	David S. Miller, Jakub Kicinski, Simon Horman, Jens Axboe,
	Martin KaFai Lau, netdev, linux-kernel, kernel-team

On Wed, Aug 19, 2026 at 04:27:58PM +0200, Christoph Hellwig wrote:
> On Wed, Aug 19, 2026 at 06:15:35AM -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.
> > 
> > Drop the symbol export.
> 
> exports?

Ack. I will udpdate it.

> Otherwise looks good:


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

end of thread, other threads:[~2026-08-19 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-19 13:15 [PATCH net] net/socket: remove unused do_sock_{set,get}sockopt() exports Breno Leitao
2026-08-19 14:27 ` Christoph Hellwig
2026-08-19 15:07   ` Breno Leitao

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