[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0a0cb0fac4ebdc23f01d183a9de10731dc90093.camel@redhat.com>
Date: Tue, 27 Jun 2023 14:51:12 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Jakub Kicinski <kuba@...nel.org>,
David Howells <dhowells@...hat.com>
Cc: Ilya Dryomov <idryomov@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, ceph-devel@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Is ->sendmsg() allowed to change the msghdr struct it is given?
On Mon, 2023-06-26 at 14:22 -0700, Jakub Kicinski wrote:
> On Mon, 26 Jun 2023 22:14:41 +0100 David Howells wrote:
> > Do you know if ->sendmsg() might alter the msghdr struct it is passed as an
> > argument? Certainly it can alter msg_iter, but can it also modify,
> > say, msg_flags?
>
> I'm not aware of a precedent either way.
> Eric or Paolo would know better than me, tho.
udp_sendmsg() can set the MSG_TRUNC bit in msg->msg_flags, so I guess
that kind of actions are sort of allowed. Still, AFAICS, the kernel
based msghdr is not copied back to the user-space, so such change
should be almost a no-op in practice.
@David: which would be the end goal for such action?
Cheers,
Paolo
Powered by blists - more mailing lists