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 4C6E66B0003 for ; Sun, 4 Mar 2018 06:44:46 -0500 (EST) Received: by mail-wr0-f199.google.com with SMTP id r15so9495694wrr.16 for ; Sun, 04 Mar 2018 03:44:46 -0800 (PST) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id o15sor483018wrg.19.2018.03.04.03.44.44 for (Google Transport Security); Sun, 04 Mar 2018 03:44:44 -0800 (PST) Date: Sun, 4 Mar 2018 12:44:39 +0100 From: Ingo Molnar Subject: Re: [RFC PATCH 00/14] khwasan: kernel hardware assisted address sanitizer Message-ID: <20180304114439.zxksut65mefrpc7w@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Geert Uytterhoeven Cc: Andrey Konovalov , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Jonathan Corbet , Catalin Marinas , Will Deacon , Theodore Ts'o , Jan Kara , Christopher Li , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Masahiro Yamada , Michal Marek , Mark Rutland , Ard Biesheuvel , Yury Norov , Nick Desaulniers , Marc Zyngier , Bob Picco , Suzuki K Poulose , Kristina Martsenko , Punit Agrawal , Dave Martin , James Morse , Julien Thierry , Michael Weiser , Steve Capper , Thomas Gleixner , Sandipan Das , Paul Lawrence , David Woodhouse , Kees Cook , Josh Poimboeuf , Arnd Bergmann , kasan-dev@googlegroups.com, linux-doc@vger.kernel.org, Linux Kernel Mailing List , Linux ARM , linux-ext4@vger.kernel.org, linux-sparse@vger.kernel.org, Linux MM , linux-kbuild , Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Kees Cook , Jann Horn , Mark Brand * Geert Uytterhoeven wrote: > Hi Andrey, > > On Fri, Mar 2, 2018 at 8:44 PM, Andrey Konovalov wrote: > > This patchset adds a new mode to KASAN, which is called KHWASAN (Kernel > > HardWare assisted Address SANitizer). There's still some work to do and > > there are a few TODOs in the code, so I'm publishing this as a RFC to > > collect some initial feedback. > > > > The plan is to implement HWASan [1] for the kernel with the incentive, > > that it's going to have comparable performance, but in the same time > > consume much less memory, trading that off for somewhat imprecise bug > > detection and being supported only for arm64. > > > > The overall idea of the approach used by KHWASAN is the following: > > > > 1. By using the Top Byte Ignore arm64 CPU feature, we can store pointer > > tags in the top byte of each kernel pointer. > > And for how long will this be OK? Firstly it's not for production kernels, it's a hardware accelerator for an intrusive debug feature, so it shouldn't really matter, right? Secondly, if the top byte is lost and the other 56 bits can still be used that gives a virtual memory space of up to 65,536 TB, which should be enough for a few years in the arm64 space, right? > Remembering: > - AmigaBasic, > - MacOS, > - Emacs, > - ... > They all tried to use the same trick, and did regret... > (AmigaBasic never survived this failure). The 64-bit address space is really a lot larger, and it's a debug-info feature in any case. Thanks, Ingo -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org