[PATCH 2/4] mm: security: Allow default HARDENED_USERCOPY to be set at compile time

2025-01-23 Thread Mel Gorman
HARDENED_USERCOPY defaults to on if enabled at compile time. Allow hardened_usercopy= default to be set at compile time similar to init_on_alloc= and init_on_free=. The intent is that hardening options that can be disabled at runtime can set their default at build time. Signed-off-by: Mel Gorman

Re: [PATCH 2/4] mm: security: Allow default HARDENED_USERCOPY to be set at compile time

2025-01-23 Thread David Laight
... > > +config HARDENED_USERCOPY_DEFAULT_ON > > + bool "Harden memory copies by default" > > + depends on HARDENED_USERCOPY > > + default n > > This must be "default HARDENED_USERCOPY" or existing distro builds will > break. All major distros enable this by default, and I don't want to

Re: [PATCH 2/4] mm: security: Allow default HARDENED_USERCOPY to be set at compile time

2025-01-23 Thread Mel Gorman
On Wed, Jan 22, 2025 at 04:57:37PM -0800, Kees Cook wrote: > On Wed, Jan 22, 2025 at 05:19:23PM +, Mel Gorman wrote: > > HARDENED_USERCOPY defaults to on if enabled at compile time. Allow > > hardened_usercopy= default to be set at compile time similar to > > init_on_alloc= and init_on_free=. T

Re: [PATCH 2/4] mm: security: Allow default HARDENED_USERCOPY to be set at compile time

2025-01-22 Thread Kees Cook
On Wed, Jan 22, 2025 at 05:19:23PM +, Mel Gorman wrote: > HARDENED_USERCOPY defaults to on if enabled at compile time. Allow > hardened_usercopy= default to be set at compile time similar to > init_on_alloc= and init_on_free=. The intent is that hardening > options that can be disabled at runti

[PATCH 2/4] mm: security: Allow default HARDENED_USERCOPY to be set at compile time

2025-01-22 Thread Mel Gorman
HARDENED_USERCOPY defaults to on if enabled at compile time. Allow hardened_usercopy= default to be set at compile time similar to init_on_alloc= and init_on_free=. The intent is that hardening options that can be disabled at runtime can set their default at build time. Signed-off-by: Mel Gorman