From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f199.google.com (mail-io0-f199.google.com [209.85.223.199]) by kanga.kvack.org (Postfix) with ESMTP id E31088E0001 for ; Tue, 11 Sep 2018 12:10:09 -0400 (EDT) Received: by mail-io0-f199.google.com with SMTP id f4-v6so4316999ioh.13 for ; Tue, 11 Sep 2018 09:10:09 -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 o8-v6sor899321itf.135.2018.09.11.09.10.08 for (Google Transport Security); Tue, 11 Sep 2018 09:10:08 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <3f2dee71-1615-4a34-d611-3ccaf407551e@virtuozzo.com> References: <3f2dee71-1615-4a34-d611-3ccaf407551e@virtuozzo.com> From: Andrey Konovalov Date: Tue, 11 Sep 2018 18:10:07 +0200 Message-ID: Subject: Re: [PATCH v6 16/18] khwasan, mm, arm64: tag non slab memory allocated via pagealloc Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Andrey Ryabinin Cc: Alexander Potapenko , Dmitry Vyukov , Catalin Marinas , Will Deacon , Christoph Lameter , Andrew Morton , Mark Rutland , Nick Desaulniers , Marc Zyngier , Dave Martin , Ard Biesheuvel , "Eric W . Biederman" , Ingo Molnar , Paul Lawrence , Geert Uytterhoeven , Arnd Bergmann , "Kirill A . Shutemov" , Greg Kroah-Hartman , Kate Stewart , Mike Rapoport , 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 , Jann Horn , Mark Brand , Chintan Pandya , Vishwath Mohan On Fri, Sep 7, 2018 at 6:06 PM, Andrey Ryabinin wrote: > > > On 08/29/2018 02:35 PM, Andrey Konovalov wrote: > >> void kasan_poison_slab(struct page *page) >> { >> + unsigned long i; >> + >> + if (IS_ENABLED(CONFIG_SLAB)) >> + page->s_mem = reset_tag(page->s_mem); > > Why reinitialize here, instead of single initialization in alloc_slabmgmt()? Hm, don't see why I did it this way, looks odd to me as well. Will fix in v7, thanks!