Commit 496d2d23 authored by Mel Gorman's avatar Mel Gorman Committed by Kees Cook
Browse files

mm: security: Check early if HARDENED_USERCOPY is enabled



HARDENED_USERCOPY is checked within a function so even if disabled, the
function overhead still exists. Move the static check inline.

This is at best a micro-optimisation and any difference in performance
was within noise but it is relatively consistent with the init_on_*
implementations.

Suggested-by: default avatarKees Cook <kees@kernel.org>
Signed-off-by: default avatarMel Gorman <mgorman@techsingularity.net>
Link: https://lore.kernel.org/r/20250123221115.19722-4-mgorman@techsingularity.net


Signed-off-by: default avatarKees Cook <kees@kernel.org>
parent d2132f45
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment