Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5299110imm; Tue, 31 Jul 2018 08:39:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfX2pGndUtqs1s0lB5qQ0ghsz0Ok7yavta2SDz2R+b89C+y8fz4GQtgbGW1pF/9V8SrwyOl X-Received: by 2002:a63:fc0a:: with SMTP id j10-v6mr20981382pgi.1.1533051563293; Tue, 31 Jul 2018 08:39:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533051563; cv=none; d=google.com; s=arc-20160816; b=Mn2h+ULopYjavaT6dSGc2ncIAVq0LKy+gKXGX2+lsesMC01KqBdTPTCx3U//XJfUNU TOBpDMdR15SOIORJjqopk63PvCLkj8admE95rmW2dkOJ8hmMuW6bw5zfmbyagxWcRA0u gTSbVvZktBErBu2EtY5ZCji+Pfd+Sh+QgKbQXNupFHCq7KL6waBr2iEf+tCoNPVZQ1o5 O73eACwNAk4oWTzVgbNiis65Ik5vl+qQP2uJw5h0o2mHzI0MbFuxlo0ge1CpFvDnPnsL nfUKxW4ufReC0fAdH2mQjYGCizzqi7yjNVOpAbdMavsrytNtYfkLj3nKFRfkCBMdtCPf dw9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=BogwT2s0os/XINJIfIGe0l1J+D1a1gT94Kvu9lh++B4=; b=NC/dLDeqpTNJGXP9eU4W2INRux9vVfp4e+4c/znQbZvGTQLj11JMUYmb0nId5ImXUm TYO7EeqrxR0wBzXyMThyDJhRshAgxgdjsfpq+tSrSsyJQO3cNmN+GAkGtnM4SjxbQu0N ugOep0MfmWd0JPC8MM1+cLp+cHc7LSRelin816KT8KM4cgD6+v7uP/kZlHmF5w+U9iKq VGydSLB/qt8UdMuJ5xV68kcgyVvN2gB772Ys7LujZ96Moa3QtjZiNYJBivvLRxAI2p37 mJTfAsmNXcpV8Gh9Z+/X3GOVk8Bn1/6pl+Za95yT7q3tSbKbJ17Dc+fOjaUTI4QcMhZI WmZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=NZr6aQPG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r16-v6si13620222pgg.254.2018.07.31.08.39.09; Tue, 31 Jul 2018 08:39:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=NZr6aQPG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732449AbeGaRTH (ORCPT + 99 others); Tue, 31 Jul 2018 13:19:07 -0400 Received: from a9-112.smtp-out.amazonses.com ([54.240.9.112]:34382 "EHLO a9-112.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732013AbeGaRTG (ORCPT ); Tue, 31 Jul 2018 13:19:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1533051493; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=BogwT2s0os/XINJIfIGe0l1J+D1a1gT94Kvu9lh++B4=; b=NZr6aQPG9Oqh/hGxTbdIdeLqbPGDQn2DG2iCXGytmjGXQrGRLlWg/+w9OugVvqLE bpT7Az9bvJjFml3WY1GnGPvc8qr1xKhhni3heMzSqQCrGRtRCb6MwhN1UE7wl9YOsn+ 0ruAMwoKVP7LPDdQQRaLP1pQfM/wnpRN+VuP+ZTc= Date: Tue, 31 Jul 2018 15:38:13 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake 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 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> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2018.07.31-54.240.9.112 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?