From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f200.google.com (mail-qt0-f200.google.com [209.85.216.200]) by kanga.kvack.org (Postfix) with ESMTP id D9B9A6B0005 for ; Tue, 31 Jul 2018 11:38:15 -0400 (EDT) Received: by mail-qt0-f200.google.com with SMTP id k21-v6so13231600qtj.23 for ; Tue, 31 Jul 2018 08:38:15 -0700 (PDT) Received: from a9-99.smtp-out.amazonses.com (a9-99.smtp-out.amazonses.com. [54.240.9.99]) by mx.google.com with ESMTPS id 12-v6si1634363qkq.351.2018.07.31.08.38.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Jul 2018 08:38:14 -0700 (PDT) Date: Tue, 31 Jul 2018 15:38:13 +0000 From: Christopher Lameter Subject: Re: [PATCH v4 13/17] khwasan: add hooks implementation In-Reply-To: Message-ID: <01000164f0fd5abc-df9ea911-9701-498c-adce-9f833e6df3ed-000000@email.amazonses.com> References: <09cb5553-d84a-0e62-5174-315c14b88833@arm.com> <8240d4f9-c8df-cfe9-119d-6e933f8b13df@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Dmitry Vyukov Cc: Andrey Ryabinin , Andrey Konovalov , vincenzo.frascino@arm.com, Alexander Potapenko , Catalin Marinas , Will Deacon , 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 , Chintan Pandya , Jacob Bramley , Jann Horn , Ruben Ayrapetyan , Lee Smith , Kostya Serebryany , Mark Brand , Ramana Radhakrishnan , Evgeniy Stepanov On Tue, 31 Jul 2018, Dmitry Vyukov wrote: > > Actually you should do this for SLAB_TYPESAFE_BY_RCU slabs. Usually they are with ->ctors but there > > are few without constructors. > > We can't reinitialize or even retag them. The latter will definitely cause false-positive use-after-free reports. > > Somewhat offtopic, but I can't understand how SLAB_TYPESAFE_BY_RCU > slabs can be useful without ctors or at least memset(0). Objects in > such slabs need to be type-stable, but I can't understand how it's > possible to establish type stability without a ctor... Are these bugs? > Or I am missing something subtle? What would be a canonical usage of > SLAB_TYPESAFE_BY_RCU slab without a ctor? True that sounds fishy. Would someone post a list of SLAB_TYPESAFE_BY_RCU slabs without ctors?