Messages in this thread | | | Date | Tue, 19 Sep 2023 10:56:30 -0700 | From | Kees Cook <> | Subject | Re: [RFC PATCH 00/14] Prevent cross -cache attacks in the SLUB allocator |
| |
On September 19, 2023 9:02:07 AM PDT, Dave Hansen <dave.hansen@intel.com> wrote: >On 9/19/23 08:48, Matteo Rizzo wrote: >>> I think the whole "make it one single compile-time option" model is >>> completely and fundamentally broken. >> Wouldn't making this toggleable at boot time or runtime make performance >> even worse? > >Maybe. > >But you can tolerate even more of a performance impact from a feature if >the people that don't care can actually disable it. > >There are also plenty of ways to minimize the overhead of switching it >on and off at runtime. Static branches are your best friend here.
Let's start with a boot time on/off toggle (no per-slab, no switch on out-of-space, etc). That should be sufficient for initial ease of use for testing, etc. But yes, using static_branch will nicely DTRT here.
-- Kees Cook
| |