]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring/net: isolate msghdr copying code
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 26 Feb 2025 11:41:17 +0000 (11:41 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 27 Feb 2025 14:27:55 +0000 (07:27 -0700)
commita223e96f7305fc482b4b41424e53d12ef693793d
tree95c29125da0e054b844e678c4f32275a38dfd767
parent0fc5a589aff7f9e613ff94fd3dd0a6686ffcb706
io_uring/net: isolate msghdr copying code

The user access section in io_msg_copy_hdr() is overextended by covering
selected buffers. It's hard to work with and prone to errors. Limit the
section to msghdr import only, selected buffers will do a separate
copy_from_user() call, and then move it into its own function. This
should be fine, selected buffer single shots are not important, for
multishots the overhead should be non-existent, and it's not that
expensive overall.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/d3eb1f81c8cfbea9f1aa57dab90c472d2aa6e371.1740569495.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c