From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f198.google.com (mail-io0-f198.google.com [209.85.223.198]) by kanga.kvack.org (Postfix) with ESMTP id 743B96B0008 for ; Fri, 9 Mar 2018 13:10:05 -0500 (EST) Received: by mail-io0-f198.google.com with SMTP id k79so3393241ioi.6 for ; Fri, 09 Mar 2018 10:10:05 -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 f20sor1217079itb.129.2018.03.09.10.10.04 for (Google Transport Security); Fri, 09 Mar 2018 10:10:04 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20180308112532.4ijhy4dyb6u72nvl@lakrids.cambridge.arm.com> References: <06a4d0c483fba8babd01fe23727fe4a79482d309.1520017438.git.andreyknvl@google.com> <20180305144405.jhrftj56hnlfl4ko@lakrids.cambridge.arm.com> <20180308112532.4ijhy4dyb6u72nvl@lakrids.cambridge.arm.com> From: Andrey Konovalov Date: Fri, 9 Mar 2018 19:10:03 +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: Mark Rutland 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 Thu, Mar 8, 2018 at 12:25 PM, Mark Rutland wrote: > 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. Will do, thanks!