netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] net: Finish up ->msg_control{,_user} split
@ 2023-04-13 11:47 Kevin Brodsky
  2023-04-13 11:47 ` [PATCH v2 1/3] net: Ensure ->msg_control_user is used for user buffers Kevin Brodsky
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Kevin Brodsky @ 2023-04-13 11:47 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, Kevin Brodsky, Christoph Hellwig, Eric Dumazet,
	David S. Miller, Jakub Kicinski

Hi,

Commit 1f466e1f15cf ("net: cleanly handle kernel vs user buffers for
->msg_control") introduced the msg_control_user and
msg_control_is_user fields in struct msghdr, to ensure that user
pointers are represented as such. It also took care of converting most
users of struct msghdr::msg_control where user pointers are involved. It
did however miss a number of cases, and some code using msg_control
inappropriately has also appeared in the meantime.

This series is attempting to complete the split, by eliminating the
remaining cases where msg_control is used when in fact a user
pointer is stored in the union (patch 1).

It also addresses a couple of issues with msg_control_is_user: one where
it is not updated as it should (patch 2), and one where it is not
initialised (patch 3).

v1..v2:
* Split out the msg_control_is_user fixes into separate patches.

v1: https://lore.kernel.org/all/20230411122625.3902339-1-kevin.brodsky@arm.com/

Thanks,
Kevin

Cc: Christoph Hellwig <hch@lst.de>
Cc: Eric Dumazet <edumazet@google.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>

Kevin Brodsky (3):
  net: Ensure ->msg_control_user is used for user buffers
  net/compat: Update msg_control_is_user when setting a kernel pointer
  net/ipv6: Initialise msg_control_is_user

 net/compat.c             | 13 +++++++------
 net/core/scm.c           |  9 ++++++---
 net/ipv4/tcp.c           |  4 ++--
 net/ipv6/ipv6_sockglue.c |  1 +
 4 files changed, 16 insertions(+), 11 deletions(-)

-- 
2.38.1


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

end of thread, other threads:[~2023-04-14 10:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-13 11:47 [PATCH v2 0/3] net: Finish up ->msg_control{,_user} split Kevin Brodsky
2023-04-13 11:47 ` [PATCH v2 1/3] net: Ensure ->msg_control_user is used for user buffers Kevin Brodsky
2023-04-13 14:08   ` Christoph Hellwig
2023-04-13 11:47 ` [PATCH v2 2/3] net/compat: Update msg_control_is_user when setting a kernel pointer Kevin Brodsky
2023-04-13 14:07   ` Christoph Hellwig
2023-04-13 11:47 ` [PATCH v2 3/3] net/ipv6: Initialise msg_control_is_user Kevin Brodsky
2023-04-13 14:07   ` Christoph Hellwig
2023-04-14 10:30 ` [PATCH v2 0/3] net: Finish up ->msg_control{,_user} split patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).