From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f72.google.com (mail-it0-f72.google.com [209.85.214.72]) by kanga.kvack.org (Postfix) with ESMTP id 9C3CD6B0006 for ; Tue, 22 May 2018 10:38:35 -0400 (EDT) Received: by mail-it0-f72.google.com with SMTP id i200-v6so55886itb.9 for ; Tue, 22 May 2018 07:38:35 -0700 (PDT) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id e18-v6sor46363itc.92.2018.05.22.07.38.34 for (Google Transport Security); Tue, 22 May 2018 07:38:34 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <69a5a7d3-e2ae-1100-f56f-9edfb0c4b3dd@virtuozzo.com> References: <454315e28d8bdd8e507de2e29f718f1fcae17d58.1525798753.git.andreyknvl@google.com> <69a5a7d3-e2ae-1100-f56f-9edfb0c4b3dd@virtuozzo.com> From: Andrey Konovalov Date: Tue, 22 May 2018 16:38:33 +0200 Message-ID: Subject: Re: [PATCH v1 02/16] khwasan: move common kasan and khwasan code to common.c 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 , Christopher Li , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Masahiro Yamada , Michal Marek , Mark Rutland , Nick Desaulniers , Yury Norov , Marc Zyngier , Kristina Martsenko , Suzuki K Poulose , Punit Agrawal , Dave Martin , Ard Biesheuvel , James Morse , Michael Weiser , Julien Thierry , Tyler Baicar , "Eric W . Biederman" , Thomas Gleixner , Ingo Molnar , Kees Cook , Sandipan Das , David Woodhouse , Paul Lawrence , Herbert Xu , Josh Poimboeuf , Geert Uytterhoeven , Tom Lendacky , Arnd Bergmann , Dan Williams , Michal Hocko , Jan Kara , Ross Zwisler , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Matthew Wilcox , "Kirill A . Shutemov" , Souptick Joarder , Hugh Dickins , Davidlohr Bueso , Greg Kroah-Hartman , Philippe Ombredanne , Kate Stewart , Laura Abbott , Boris Brezillon , Vlastimil Babka , Pintu Agarwal , Doug Berger , Anshuman Khandual , Mike Rapoport , Mel Gorman , Pavel Tatashin , Tetsuo Handa , kasan-dev , linux-doc@vger.kernel.org, LKML , Linux ARM , 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 , Chintan Pandya On Tue, May 15, 2018 at 3:28 PM, Andrey Ryabinin wrote: > > > On 05/08/2018 08:20 PM, Andrey Konovalov wrote: > >> + >> +void set_track(struct kasan_track *track, gfp_t flags) > > This was - static inline void set_track(struct kasan_track *track, gfp_t flags) > and still used only locally. > >> +{ >> + track->pid = current->pid; >> + track->stack = save_stack(flags); >> +} >> + Will fix in v2. > > > >> /* >> * Adaptive redzone policy taken from the userspace AddressSanitizer runtime. >> * For larger allocations larger redzones are used. >> */ >> -static unsigned int optimal_redzone(unsigned int object_size) >> +unsigned int optimal_redzone(unsigned int object_size) > > I'd rather move this in common too. > For khwasan you could just add: > if (IS_ENABLED(CONFIG_KASAN_HW)) > return 0; > > Will move in v2.