From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f199.google.com (mail-wr0-f199.google.com [209.85.128.199]) by kanga.kvack.org (Postfix) with ESMTP id A14226B0012 for ; Tue, 27 Mar 2018 16:02:29 -0400 (EDT) Received: by mail-wr0-f199.google.com with SMTP id w10so42382wrg.15 for ; Tue, 27 Mar 2018 13:02:29 -0700 (PDT) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id a4sor671410wmc.55.2018.03.27.13.02.28 for (Google Transport Security); Tue, 27 Mar 2018 13:02:28 -0700 (PDT) Date: Tue, 27 Mar 2018 22:02:23 +0200 From: Ingo Molnar Subject: Re: [RFC PATCH v2 03/15] khwasan: add CONFIG_KASAN_CLASSIC and CONFIG_KASAN_TAGS Message-ID: <20180327200223.5ku2eqkppi7z3sd2@gmail.com> References: <1fb0a050a84d49f5c3b2210337339412475d1688.1521828273.git.andreyknvl@google.com> <20180324084332.u6qik7lkdbenqbb2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Andrey Konovalov Cc: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Jonathan Corbet , Catalin Marinas , Will Deacon , Christoffer Dall , Marc Zyngier , Christopher Li , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Masahiro Yamada , Michal Marek , Mark Rutland , Ard Biesheuvel , Yury Norov , Nick Desaulniers , Suzuki K Poulose , Kristina Martsenko , Punit Agrawal , Dave Martin , Michael Weiser , James Morse , Julien Thierry , Steve Capper , Tyler Baicar , "Eric W . Biederman" , Stephen Boyd , Thomas Gleixner , Paul Lawrence , Greg Kroah-Hartman , David Woodhouse , Sandipan Das , Kees Cook , Herbert Xu , Geert Uytterhoeven , Josh Poimboeuf , Arnd Bergmann , kasan-dev , linux-doc@vger.kernel.org, LKML , Linux ARM , kvmarm@lists.cs.columbia.edu, linux-sparse@vger.kernel.org, Linux Memory Management List , Linux Kbuild mailing list , Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Kees Cook , Jann Horn , Mark Brand * Andrey Konovalov wrote: > On Sat, Mar 24, 2018 at 9:43 AM, Ingo Molnar wrote: > > > > * Andrey Konovalov wrote: > > > >> This commit splits the current CONFIG_KASAN config option into two: > >> 1. CONFIG_KASAN_CLASSIC, that enables the classic KASAN version (the one > >> that exists now); > >> 2. CONFIG_KASAN_TAGS, that enables KHWASAN. > > > > Sorry, but this is pretty obscure naming scheme that doesn't explain the primary > > difference between these KASAN models to users: that the first one is a pure > > software implementation and the other is hardware-assisted. > > > > Reminds me of the transparency of galactic buerocracy in "The Hitchhiker's Guide > > to the Galaxy": > > > > a??But look, you found the notice, didna??t you?a?? > > a??Yes,a?? said Arthur, a??yes I did. It was on display in the bottom of a locked filing > > cabinet stuck in a disused lavatory with a sign on the door saying a??Beware of the > > Leopard.a?? > > > > I'd suggest something more expressive, such as: > > > > CONFIG_KASAN > > CONFIG_KASAN_GENERIC > > CONFIG_KASAN_HW_ASSIST > > > > or so? > > > > The 'generic' variant will basically run on any CPU. The 'hardware assisted' one > > needs support from the CPU. > > > > The following ones might also work: > > > > CONFIG_KASAN_HWASSIST > > CONFIG_KASAN_HW_TAGS > > CONFIG_KASAN_HWTAGS > > > > ... or simply CONFIG_KASAN_SW/CONFIG_KASAN_HW. > > > > If other types of KASAN hardware acceleration are implemented in the future then > > the CONFIG_KASAN_HW namespace can be extended: > > > > CONFIG_KASAN_HW_TAGS > > CONFIG_KASAN_HW_KEYS > > etc. > > How about these two: > > CONFIG_KASAN_GENERIC > CONFIG_KASAN_HW > > ? > > Shorter config name looks better to me and I think it makes sense to > name the new config just HW, as there's only one HW implementation > right now. When (and if) there are more, we can expand the config name > as you suggested (CONFIG_KASAN_HW_TAGS, CONFIG_KASAN_HW_KEYS, etc). Sure, sounds good to me! Thanks, Ingo