do_sock_getsockopt() works with a kernel pointer for optlen now. Link: https://lore.kernel.org/io-uring/86b1dce5-4bb4-4a0b-9cff-e72f488bf57d@xxxxxxxxx/T/#t Cc: Jens Axboe <axboe@xxxxxxxxx> Cc: Pavel Begunkov <asml.silence@xxxxxxxxx> Cc: Breno Leitao <leitao@xxxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Jakub Kicinski <kuba@xxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Cc: Karsten Keil <isdn@xxxxxxxxxxxxxx> Cc: Ayush Sawal <ayush.sawal@xxxxxxxxxxx> Cc: Andrew Lunn <andrew+netdev@xxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Cc: Eric Dumazet <edumazet@xxxxxxxxxx> Cc: Paolo Abeni <pabeni@xxxxxxxxxx> Cc: Simon Horman <horms@xxxxxxxxxx> Cc: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx> Cc: Willem de Bruijn <willemb@xxxxxxxxxx> Cc: David Ahern <dsahern@xxxxxxxxxx> Cc: Marcelo Ricardo Leitner <marcelo.leitner@xxxxxxxxx> Cc: Xin Long <lucien.xin@xxxxxxxxx> Cc: Neal Cardwell <ncardwell@xxxxxxxxxx> Cc: Joerg Reuter <jreuter@xxxxxxxx> Cc: Marcel Holtmann <marcel@xxxxxxxxxxxx> Cc: Johan Hedberg <johan.hedberg@xxxxxxxxx> Cc: Luiz Augusto von Dentz <luiz.dentz@xxxxxxxxx> Cc: Oliver Hartkopp <socketcan@xxxxxxxxxxxx> Cc: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> Cc: Robin van der Gracht <robin@xxxxxxxxxxx> Cc: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> Cc: kernel@xxxxxxxxxxxxxx Cc: Alexander Aring <alex.aring@xxxxxxxxx> Cc: Stefan Schmidt <stefan@xxxxxxxxxxxxxxxxxx> Cc: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> Cc: Alexandra Winter <wintera@xxxxxxxxxxxxx> Cc: Thorsten Winkler <twinkler@xxxxxxxxxxxxx> Cc: James Chapman <jchapman@xxxxxxxxxxx> Cc: Jeremy Kerr <jk@xxxxxxxxxxxxxxxxxxxx> Cc: Matt Johnston <matt@xxxxxxxxxxxxxxxxxxxx> Cc: Matthieu Baerts <matttbe@xxxxxxxxxx> Cc: Mat Martineau <martineau@xxxxxxxxxx> Cc: Geliang Tang <geliang@xxxxxxxxxx> Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx> Cc: Remi Denis-Courmont <courmisch@xxxxxxxxx> Cc: Allison Henderson <allison.henderson@xxxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Cc: Marc Dionne <marc.dionne@xxxxxxxxxxxx> Cc: Wenjia Zhang <wenjia@xxxxxxxxxxxxx> Cc: Jan Karcher <jaka@xxxxxxxxxxxxx> Cc: "D. Wythe" <alibuda@xxxxxxxxxxxxxxxxx> Cc: Tony Lu <tonylu@xxxxxxxxxxxxxxxxx> Cc: Wen Gu <guwen@xxxxxxxxxxxxxxxxx> Cc: Jon Maloy <jmaloy@xxxxxxxxxx> Cc: Boris Pismenny <borisp@xxxxxxxxxx> Cc: John Fastabend <john.fastabend@xxxxxxxxx> Cc: Stefano Garzarella <sgarzare@xxxxxxxxxx> Cc: Martin Schiller <ms@xxxxxxxxxx> Cc: "Björn Töpel" <bjorn@xxxxxxxxxx> Cc: Magnus Karlsson <magnus.karlsson@xxxxxxxxx> Cc: Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx> Cc: Jonathan Lemon <jonathan.lemon@xxxxxxxxx> Cc: Alexei Starovoitov <ast@xxxxxxxxxx> Cc: Daniel Borkmann <daniel@xxxxxxxxxxxxx> Cc: Jesper Dangaard Brouer <hawk@xxxxxxxxxx> CC: Stefan Metzmacher <metze@xxxxxxxxx> Cc: netdev@xxxxxxxxxxxxxxx Cc: linux-kernel@xxxxxxxxxxxxxxx Cc: linux-sctp@xxxxxxxxxxxxxxx Cc: linux-hams@xxxxxxxxxxxxxxx Cc: linux-bluetooth@xxxxxxxxxxxxxxx Cc: linux-can@xxxxxxxxxxxxxxx Cc: dccp@xxxxxxxxxxxxxxx Cc: linux-wpan@xxxxxxxxxxxxxxx Cc: linux-s390@xxxxxxxxxxxxxxx Cc: mptcp@xxxxxxxxxxxxxxx Cc: linux-rdma@xxxxxxxxxxxxxxx Cc: rds-devel@xxxxxxxxxxxxxx Cc: linux-afs@xxxxxxxxxxxxxxxxxxx Cc: tipc-discussion@xxxxxxxxxxxxxxxxxxxxx Cc: virtualization@xxxxxxxxxxxxxxx Cc: linux-x25@xxxxxxxxxxxxxxx Cc: bpf@xxxxxxxxxxxxxxx Cc: isdn4linux@xxxxxxxxxxxxxxxxxxxxxx Cc: io-uring@xxxxxxxxxxxxxxx Signed-off-by: Stefan Metzmacher <metze@xxxxxxxxx> --- 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