Re: [PATCH 2/4] mm: security: Allow default HARDENED_USERCOPY to be set at compile time
From: David Laight
Date: Thu Jan 23 2025 - 16:10:23 EST
...
> > +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
> risk HARDENED_USERCOPY_DEFAULT_ON getting missed and getting globally
> disabled.
It'll also cause grief for anyone trying to bisect.
Although that is always going to go wrong if it has been disabled.
I had 'fun' trying to locate a massive slowdown of a single threaded
program that was caused by a side effect of one of the speculative
execution mitigations getting enabled because the config parameter
got renamed.
David