From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f197.google.com (mail-wr0-f197.google.com [209.85.128.197]) by kanga.kvack.org (Postfix) with ESMTP id B283F6B0005 for ; Sat, 24 Mar 2018 04:43:38 -0400 (EDT) Received: by mail-wr0-f197.google.com with SMTP id c1so7075234wri.22 for ; Sat, 24 Mar 2018 01:43:38 -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 l2sor2385878wra.53.2018.03.24.01.43.37 for (Google Transport Security); Sat, 24 Mar 2018 01:43:37 -0700 (PDT) Date: Sat, 24 Mar 2018 09:43:32 +0100 From: Ingo Molnar Subject: Re: [RFC PATCH v2 03/15] khwasan: add CONFIG_KASAN_CLASSIC and CONFIG_KASAN_TAGS Message-ID: <20180324084332.u6qik7lkdbenqbb2@gmail.com> References: <1fb0a050a84d49f5c3b2210337339412475d1688.1521828273.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1fb0a050a84d49f5c3b2210337339412475d1688.1521828273.git.andreyknvl@google.com> 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@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-sparse@vger.kernel.org, linux-mm@kvack.org, linux-kbuild@vger.kernel.org, Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Kees Cook , Jann Horn , Mark Brand * 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. > Both CONFIG_KASAN_CLASSIC and CONFIG_KASAN_CLASSIC support both > CONFIG_KASAN_INLINE and CONFIG_KASAN_OUTLINE instrumentation modes. It would be very surprising if that wasn't so! Or did you mean 'Both CONFIG_KASAN_CLASSIC and CONFIG_KASAN_TAGS'! ;-) Thanks, Ingo