From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f199.google.com (mail-qk0-f199.google.com [209.85.220.199]) by kanga.kvack.org (Postfix) with ESMTP id C40F06B0005 for ; Sun, 4 Mar 2018 10:49:54 -0500 (EST) Received: by mail-qk0-f199.google.com with SMTP id d128so864559qkb.6 for ; Sun, 04 Mar 2018 07:49:54 -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 v11sor8194855qtj.28.2018.03.04.07.49.53 for (Google Transport Security); Sun, 04 Mar 2018 07:49:53 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20180304114439.zxksut65mefrpc7w@gmail.com> References: <20180304114439.zxksut65mefrpc7w@gmail.com> From: Geert Uytterhoeven Date: Sun, 4 Mar 2018 16:49:52 +0100 Message-ID: Subject: Re: [RFC PATCH 00/14] khwasan: kernel hardware assisted address sanitizer Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Ingo Molnar 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 Hi Ingo, On Sun, Mar 4, 2018 at 12:44 PM, Ingo Molnar wrote: > * Geert Uytterhoeven wrote: >> 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? Sorry, I didn't know it was a debug feature. > 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. So that gives up ca. 25 years, less when considering address randomization. But as long as it stays a debug feature... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- 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