]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: remove one stac/clac pair from move_addr_to_user()
authorEric Dumazet <edumazet@google.com>
Thu, 25 Sep 2025 23:09:29 +0000 (23:09 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 30 Sep 2025 01:04:37 +0000 (18:04 -0700)
commit1fb0e471611dc6a79dee609a7e0037eb1d124400
treec9fcdae5a6802a158e9f085e964588267c6e60a5
parent2b235765e9d4426cf56d7fd1a331f81a4dbbd85a
net: remove one stac/clac pair from move_addr_to_user()

Convert the get_user() and __put_user() code to the
fast masked_user_access_begin()/unsafe_{get|put}_user()
variant.

This patch increases the performance of an UDP recvfrom()
receiver (netserver) on 120 bytes messages by 7 %
on an AMD EPYC 7B12 64-Core Processor platform.

Presence of audit_sockaddr() makes difficult
to avoid the stac/clac pair in the copy_to_user() call,
this is left for a future patch.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250925230929.3727873-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/socket.c