From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f198.google.com (mail-qk0-f198.google.com [209.85.220.198]) by kanga.kvack.org (Postfix) with ESMTP id DD6096B0003 for ; Sun, 4 Mar 2018 04:16:21 -0500 (EST) Received: by mail-qk0-f198.google.com with SMTP id 184so11729458qki.0 for ; Sun, 04 Mar 2018 01:16:21 -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 c24sor7881468qtg.150.2018.03.04.01.16.20 for (Google Transport Security); Sun, 04 Mar 2018 01:16:20 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Geert Uytterhoeven Date: Sun, 4 Mar 2018 10:16:20 +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: Andrey Konovalov Cc: 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 , Ingo Molnar , 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 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? Remembering: - AmigaBasic, - MacOS, - Emacs, - ... They all tried to use the same trick, and did regret... (AmigaBasic never survived this failure). "Those who don't know history are doomed to repeat it." 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