From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f72.google.com (mail-oi0-f72.google.com [209.85.218.72]) by kanga.kvack.org (Postfix) with ESMTP id CD81A6B0003 for ; Thu, 8 Mar 2018 06:25:44 -0500 (EST) Received: by mail-oi0-f72.google.com with SMTP id x85so2797926oix.8 for ; Thu, 08 Mar 2018 03:25:44 -0800 (PST) Received: from foss.arm.com (foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id g8si6060038otc.319.2018.03.08.03.25.43 for ; Thu, 08 Mar 2018 03:25:43 -0800 (PST) Date: Thu, 8 Mar 2018 11:25:32 +0000 From: Mark Rutland Subject: Re: [RFC PATCH 09/14] khwasan: add hooks implementation Message-ID: <20180308112532.4ijhy4dyb6u72nvl@lakrids.cambridge.arm.com> References: <06a4d0c483fba8babd01fe23727fe4a79482d309.1520017438.git.andreyknvl@google.com> <20180305144405.jhrftj56hnlfl4ko@lakrids.cambridge.arm.com> 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: 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 , 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 Tue, Mar 06, 2018 at 07:38:08PM +0100, Andrey Konovalov wrote: > On Mon, Mar 5, 2018 at 3:44 PM, Mark Rutland wrote: > > On Fri, Mar 02, 2018 at 08:44:28PM +0100, Andrey Konovalov wrote: > >> + > >> + for (shadow = shadow_first; shadow <= shadow_last; shadow++) { > >> + if (*shadow != tag) { > >> + /* Report invalid-access bug here */ > >> + return; > > > > Huh? Should that be a TODO? > > This is fixed in one of the next commits. I decided to split the main > runtime logic and the reporting parts, so this comment is a > placeholder, which is replaced with the proper error reporting > function call later in the patch series. I can make it a /* TODO: > comment */, if you think that looks better. It might be preferable to introdcue the report functions first (i.e. swap this patch with the next one). Those will be unused, but since they're not static, you shouldn't get any build warnings. Then the hooks can call the report functions as soon as they're introduced. Thanks, Mark.