On Tue, Nov 10, 2020 at 11:20:15PM +0100, Andrey Konovalov wrote: > Hardware tag-based KASAN mode is intended to eventually be used in > production as a security mitigation. Therefore there's a need for finer > control over KASAN features and for an existence of a kill switch. > > This change adds a few boot parameters for hardware tag-based KASAN that > allow to disable or otherwise control particular KASAN features. > > The features that can be controlled are: > > 1. Whether KASAN is enabled at all. > 2. Whether KASAN collects and saves alloc/free stacks. > 3. Whether KASAN panics on a detected bug or not. > > With this change a new boot parameter kasan.mode allows to choose one of > three main modes: > > - kasan.mode=off - KASAN is disabled, no tag checks are performed > - kasan.mode=prod - only essential production features are enabled > - kasan.mode=full - all KASAN features are enabled Alternative naming if we want to avoid "production" (in case someone considers MTE to be expensive in a production system): - kasan.mode=off - kasan.mode=on - kasan.mode=debug Anyway, whatever you prefer is fine by me: Acked-by: Catalin Marinas <catalin.marinas@xxxxxxx>