[RFC PATCH 4/4] io_uring: let io_uring_cmd_getsockopt() allow level other than SOL_SOCKET
Stefan Metzmacher
metze at samba.org
Mon Mar 31 13:10:56 PDT 2025
do_sock_getsockopt() works with a kernel pointer for optlen now.
Link: https://lore.kernel.org/io-uring/86b1dce5-4bb4-4a0b-9cff-e72f488bf57d@samba.org/T/#t
Cc: Jens Axboe <axboe at kernel.dk>
Cc: Pavel Begunkov <asml.silence at gmail.com>
Cc: Breno Leitao <leitao at debian.org>
Cc: Linus Torvalds <torvalds at linux-foundation.org>
Cc: Jakub Kicinski <kuba at kernel.org>
Cc: Christoph Hellwig <hch at lst.de>
Cc: Karsten Keil <isdn at linux-pingi.de>
Cc: Ayush Sawal <ayush.sawal at chelsio.com>
Cc: Andrew Lunn <andrew+netdev at lunn.ch>
Cc: "David S. Miller" <davem at davemloft.net>
Cc: Eric Dumazet <edumazet at google.com>
Cc: Paolo Abeni <pabeni at redhat.com>
Cc: Simon Horman <horms at kernel.org>
Cc: Kuniyuki Iwashima <kuniyu at amazon.com>
Cc: Willem de Bruijn <willemb at google.com>
Cc: David Ahern <dsahern at kernel.org>
Cc: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
Cc: Xin Long <lucien.xin at gmail.com>
Cc: Neal Cardwell <ncardwell at google.com>
Cc: Joerg Reuter <jreuter at yaina.de>
Cc: Marcel Holtmann <marcel at holtmann.org>
Cc: Johan Hedberg <johan.hedberg at gmail.com>
Cc: Luiz Augusto von Dentz <luiz.dentz at gmail.com>
Cc: Oliver Hartkopp <socketcan at hartkopp.net>
Cc: Marc Kleine-Budde <mkl at pengutronix.de>
Cc: Robin van der Gracht <robin at protonic.nl>
Cc: Oleksij Rempel <o.rempel at pengutronix.de>
Cc: kernel at pengutronix.de
Cc: Alexander Aring <alex.aring at gmail.com>
Cc: Stefan Schmidt <stefan at datenfreihafen.org>
Cc: Miquel Raynal <miquel.raynal at bootlin.com>
Cc: Alexandra Winter <wintera at linux.ibm.com>
Cc: Thorsten Winkler <twinkler at linux.ibm.com>
Cc: James Chapman <jchapman at katalix.com>
Cc: Jeremy Kerr <jk at codeconstruct.com.au>
Cc: Matt Johnston <matt at codeconstruct.com.au>
Cc: Matthieu Baerts <matttbe at kernel.org>
Cc: Mat Martineau <martineau at kernel.org>
Cc: Geliang Tang <geliang at kernel.org>
Cc: Krzysztof Kozlowski <krzk at kernel.org>
Cc: Remi Denis-Courmont <courmisch at gmail.com>
Cc: Allison Henderson <allison.henderson at oracle.com>
Cc: David Howells <dhowells at redhat.com>
Cc: Marc Dionne <marc.dionne at auristor.com>
Cc: Wenjia Zhang <wenjia at linux.ibm.com>
Cc: Jan Karcher <jaka at linux.ibm.com>
Cc: "D. Wythe" <alibuda at linux.alibaba.com>
Cc: Tony Lu <tonylu at linux.alibaba.com>
Cc: Wen Gu <guwen at linux.alibaba.com>
Cc: Jon Maloy <jmaloy at redhat.com>
Cc: Boris Pismenny <borisp at nvidia.com>
Cc: John Fastabend <john.fastabend at gmail.com>
Cc: Stefano Garzarella <sgarzare at redhat.com>
Cc: Martin Schiller <ms at dev.tdt.de>
Cc: "Björn Töpel" <bjorn at kernel.org>
Cc: Magnus Karlsson <magnus.karlsson at intel.com>
Cc: Maciej Fijalkowski <maciej.fijalkowski at intel.com>
Cc: Jonathan Lemon <jonathan.lemon at gmail.com>
Cc: Alexei Starovoitov <ast at kernel.org>
Cc: Daniel Borkmann <daniel at iogearbox.net>
Cc: Jesper Dangaard Brouer <hawk at kernel.org>
CC: Stefan Metzmacher <metze at samba.org>
Cc: netdev at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Cc: linux-sctp at vger.kernel.org
Cc: linux-hams at vger.kernel.org
Cc: linux-bluetooth at vger.kernel.org
Cc: linux-can at vger.kernel.org
Cc: dccp at vger.kernel.org
Cc: linux-wpan at vger.kernel.org
Cc: linux-s390 at vger.kernel.org
Cc: mptcp at lists.linux.dev
Cc: linux-rdma at vger.kernel.org
Cc: rds-devel at oss.oracle.com
Cc: linux-afs at lists.infradead.org
Cc: tipc-discussion at lists.sourceforge.net
Cc: virtualization at lists.linux.dev
Cc: linux-x25 at vger.kernel.org
Cc: bpf at vger.kernel.org
Cc: isdn4linux at listserv.isdn4linux.de
Cc: io-uring at vger.kernel.org
Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
io_uring/uring_cmd.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c
index f2cfc371f3d0..8b0cc919a60c 100644
--- a/io_uring/uring_cmd.c
+++ b/io_uring/uring_cmd.c
@@ -312,9 +312,6 @@ static inline int io_uring_cmd_getsockopt(struct socket *sock,
void __user *optval;
level = READ_ONCE(cmd->sqe->level);
- if (level != SOL_SOCKET)
- return -EOPNOTSUPP;
-
optval = u64_to_user_ptr(READ_ONCE(cmd->sqe->optval));
optname = READ_ONCE(cmd->sqe->optname);
optlen = READ_ONCE(cmd->sqe->optlen);
--
2.34.1
More information about the linux-afs
mailing list