[PATCH 3/4] mm: security: Check early if HARDENED_USERCOPY is enabled

2025-01-23 Thread Mel Gorman
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. Suggest

Re: [PATCH 3/4] mm: security: Check early if HARDENED_USERCOPY is enabled

2025-01-23 Thread Mel Gorman
On Wed, Jan 22, 2025 at 05:01:21PM -0800, Kees Cook wrote: > On Wed, Jan 22, 2025 at 05:19:24PM +, Mel Gorman wrote: > > 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-opt

Re: [PATCH 3/4] mm: security: Check early if HARDENED_USERCOPY is enabled

2025-01-22 Thread Kees Cook
On Wed, Jan 22, 2025 at 05:19:24PM +, Mel Gorman wrote: > 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

[PATCH 3/4] mm: security: Check early if HARDENED_USERCOPY is enabled

2025-01-22 Thread Mel Gorman
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. Suggest