* [PATCH] net/packet: Allow MSG_NOSIGNAL flag in packet_recvmsg
@ 2023-03-08 15:18 Adnan Dizdarevic
2023-03-08 15:35 ` Jens Axboe
2023-03-08 15:38 ` Willem de Bruijn
0 siblings, 2 replies; 4+ messages in thread
From: Adnan Dizdarevic @ 2023-03-08 15:18 UTC (permalink / raw)
To: willemdebruijn.kernel@gmail.com
Cc: axboe@kernel.dk, asml.silence@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
By adding MSG_NOSIGNAL flag to allowed flags in packet_recvmsg, this
patch fixes io_uring recvmsg operations returning -EINVAL when used with
packet socket file descriptors.
In io_uring, MSG_NOSIGNAL flag is added in:
io_uring/net.c/io_recvmsg_prep
Signed-off-by: Adnan Dizdarevic <adnan.dizdarevic@eks-intec.de>
---
net/packet/af_packet.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index d4e76e2ae153..5ce62194af9e 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -3410,7 +3410,8 @@ static int packet_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
unsigned int origlen = 0;
err = -EINVAL;
- if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC|MSG_CMSG_COMPAT|MSG_ERRQUEUE))
+ if (flags & ~(MSG_PEEK | MSG_DONTWAIT | MSG_TRUNC | MSG_CMSG_COMPAT |
+ MSG_ERRQUEUE | MSG_NOSIGNAL))
goto out;
#if 0
--
2.37.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net/packet: Allow MSG_NOSIGNAL flag in packet_recvmsg
2023-03-08 15:18 [PATCH] net/packet: Allow MSG_NOSIGNAL flag in packet_recvmsg Adnan Dizdarevic
@ 2023-03-08 15:35 ` Jens Axboe
2023-03-08 15:38 ` Willem de Bruijn
1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2023-03-08 15:35 UTC (permalink / raw)
To: Adnan Dizdarevic, willemdebruijn.kernel@gmail.com
Cc: asml.silence@gmail.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
On 3/8/23 8:18 AM, Adnan Dizdarevic wrote:
> By adding MSG_NOSIGNAL flag to allowed flags in packet_recvmsg, this
> patch fixes io_uring recvmsg operations returning -EINVAL when used with
> packet socket file descriptors.
>
> In io_uring, MSG_NOSIGNAL flag is added in:
> io_uring/net.c/io_recvmsg_prep
FWIW, this did get fixed in io_uring, it's in 6.3-rc1 and is making
its way into the stable releases too:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7605c43d67face310b4b87dee1a28bc0c8cd8c0f
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] net/packet: Allow MSG_NOSIGNAL flag in packet_recvmsg
2023-03-08 15:18 [PATCH] net/packet: Allow MSG_NOSIGNAL flag in packet_recvmsg Adnan Dizdarevic
2023-03-08 15:35 ` Jens Axboe
@ 2023-03-08 15:38 ` Willem de Bruijn
2023-03-09 6:38 ` Adnan Dizdarevic
1 sibling, 1 reply; 4+ messages in thread
From: Willem de Bruijn @ 2023-03-08 15:38 UTC (permalink / raw)
To: Adnan Dizdarevic, willemdebruijn.kernel@gmail.com
Cc: axboe@kernel.dk, asml.silence@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Adnan Dizdarevic wrote:
> By adding MSG_NOSIGNAL flag to allowed flags in packet_recvmsg, this
> patch fixes io_uring recvmsg operations returning -EINVAL when used with
> packet socket file descriptors.
>
> In io_uring, MSG_NOSIGNAL flag is added in:
> io_uring/net.c/io_recvmsg_prep
>
> Signed-off-by: Adnan Dizdarevic <adnan.dizdarevic@eks-intec.de>
This was discussed two weeks ago and io_uring adapted to no longer
require this change.
https://lore.kernel.org/netdev/Y%2Fja3Wi0tIyzXces@eidolon.nox.tf/T/
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] net/packet: Allow MSG_NOSIGNAL flag in packet_recvmsg
2023-03-08 15:38 ` Willem de Bruijn
@ 2023-03-09 6:38 ` Adnan Dizdarevic
0 siblings, 0 replies; 4+ messages in thread
From: Adnan Dizdarevic @ 2023-03-09 6:38 UTC (permalink / raw)
To: Willem de Bruijn
Cc: axboe@kernel.dk, asml.silence@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Thanks for the update. I didn't notice it got fixed in the meantime.
-----Original Message-----
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Sent: 08 March 2023 16:38
To: Adnan Dizdarevic <adnan.dizdarevic@eks-intec.de>; willemdebruijn.kernel@gmail.com
Cc: axboe@kernel.dk; asml.silence@gmail.com; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; netdev@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: RE: [PATCH] net/packet: Allow MSG_NOSIGNAL flag in packet_recvmsg
Adnan Dizdarevic wrote:
> By adding MSG_NOSIGNAL flag to allowed flags in packet_recvmsg, this
> patch fixes io_uring recvmsg operations returning -EINVAL when used
> with packet socket file descriptors.
>
> In io_uring, MSG_NOSIGNAL flag is added in:
> io_uring/net.c/io_recvmsg_prep
>
> Signed-off-by: Adnan Dizdarevic <adnan.dizdarevic@eks-intec.de>
This was discussed two weeks ago and io_uring adapted to no longer require this change.
https://lore.kernel.org/netdev/Y%2Fja3Wi0tIyzXces@eidolon.nox.tf/T/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-09 6:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-08 15:18 [PATCH] net/packet: Allow MSG_NOSIGNAL flag in packet_recvmsg Adnan Dizdarevic
2023-03-08 15:35 ` Jens Axboe
2023-03-08 15:38 ` Willem de Bruijn
2023-03-09 6:38 ` Adnan Dizdarevic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox