From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f197.google.com (mail-io0-f197.google.com [209.85.223.197]) by kanga.kvack.org (Postfix) with ESMTP id C29F76B0009 for ; Fri, 16 Mar 2018 14:09:54 -0400 (EDT) Received: by mail-io0-f197.google.com with SMTP id 184so1323061iow.19 for ; Fri, 16 Mar 2018 11:09:54 -0700 (PDT) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id i1sor3330436iob.36.2018.03.16.11.09.53 for (Google Transport Security); Fri, 16 Mar 2018 11:09:53 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <7f8e8f46-791e-7e8f-551b-f93aa64bcf6e@virtuozzo.com> References: <06a4d0c483fba8babd01fe23727fe4a79482d309.1520017438.git.andreyknvl@google.com> <7f8e8f46-791e-7e8f-551b-f93aa64bcf6e@virtuozzo.com> From: Andrey Konovalov Date: Fri, 16 Mar 2018 19:09:51 +0100 Message-ID: Subject: Re: [RFC PATCH 09/14] khwasan: add hooks implementation Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Andrey Ryabinin Cc: 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 , Geert Uytterhoeven , Josh Poimboeuf , Arnd Bergmann , kasan-dev , linux-doc@vger.kernel.org, LKML , Linux ARM , linux-ext4@vger.kernel.org, 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 On Thu, Mar 15, 2018 at 5:52 PM, Andrey Ryabinin wrote: > On 03/13/2018 08:00 PM, Andrey Konovalov wrote: >> On Tue, Mar 13, 2018 at 4:05 PM, 'Alexander Potapenko' via kasan-dev >> wrote: >>> Does it make sense to generate the redzone tag from the object tag >>> (e.g. by addding 1 to it)? >> >> Yes, I think so, will do! >> > > Wouldn't be better to have some reserved tag value for invalid memory (redzones/free), so that > we catch access to such memory with 100% probability? We could do that. That would reduce the chance to detect a use-after-free though, since we're using fewer different tag values for the objects themselves. I don't have a strong opinion about which one is better though.