Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp532932ybk; Fri, 15 May 2020 07:09:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyb2HPb9tM1HTdGMHXWKRNeIvdQxsVodRZgrd7F62xeABHV37de9xzUSLDu6nkHUl8M/QOG X-Received: by 2002:a50:e04c:: with SMTP id g12mr3128101edl.74.1589551795268; Fri, 15 May 2020 07:09:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589551795; cv=none; d=google.com; s=arc-20160816; b=Bj1GYjgaxA9ziw3AOdVYvRG+GBr3vgZtm0I6r/RPhmMohht+8g2Ppacn2hoqMiZs/6 01QWgZ7+pXf/pYmGDziRBn9m5OSeQvBFsRVzGDMlfdz1v8XEtFalO2TkyA8tMJ64Rca8 eQBahrsvCqcdU7e+Rt2JZ68d4GvNUgKyqCPwOPCth3WaydL6Ewa9RhJvHBkOUrzlNdeC it29FDFbw+QJawQOACFMp34ovJo0bBk6goZ3hy8DiIufBZtwT2z5UnXULsJ/qbNREdzB 8mMklnqYTQkdbwViaTTlP4qUCGTr3/tjCSC8AEBHnq55f9FZ2MlFvrNoRtSWE61IM8Pv DDlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=+dIiT/UOLZH4C4698DgVf1kBe7ueqiNo1hUe6DDcp2E=; b=S68GP8D/DE8GxcNJFb2rW81oSPahRGAoAEfH7aYIt81V13uEuNFfNUEoNyV4/xoRcQ dhQlPGsxKVVGdWocCS4AHsZ29sCIv4oqM/kYqk6P9IZlV70vqdR3pBOqLoNf2GQLQFWJ NlbFKnTaWp6WCDK2NujChE0z8HJViAaWFM3NLviHY2mCpABR/SEWd3kjXdbRobcROLTI HorRX6CoZ/bQPHjti/GUU1754OibCH44VkRQtc/2PFC1Ry4LoMsL8TwwyA0ObGdZo0Ui IQNxsSqb+pdXki/HcksVEbz17+YHPowLQUFG0ZF6ZgA3kjKWkPVZhHYFtex3gTkdG/o4 tmuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=zUHgBjH0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si1285217ejc.214.2020.05.15.07.09.30; Fri, 15 May 2020 07:09:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=zUHgBjH0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726185AbgEOOHx (ORCPT + 99 others); Fri, 15 May 2020 10:07:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726016AbgEOOHw (ORCPT ); Fri, 15 May 2020 10:07:52 -0400 Received: from merlin.infradead.org (unknown [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76D68C061A0C for ; Fri, 15 May 2020 07:07:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+dIiT/UOLZH4C4698DgVf1kBe7ueqiNo1hUe6DDcp2E=; b=zUHgBjH0emURWzjzxEjlGJET2s ZvOHdpNZP+Rhh213IP6MKPqnAkZbCZTtTAgjAAqI+HKCWiHP2myw9/usxrIhMOXMuKUnRLRKr+N/p DRlliMytMjPkDQEQniytCmPYUxxpkANHZW4/IN1pzrl00wJepPY+pHZsTHTS6Js14IXnjccoBZjyb 6EuihL9S6IWHC6eKIbXc7zmWqc+U80iL9LZ0IpOW4vasjFMpyomhFcRnE3ajcJ41aaU73b1JG/dC+ +p8dsqpJmFIKt62bWxSt2w4YmljO52AV1oc/4+3SjJu1UTNH1E4tWDsuvMsuN0zTXy05TfbTU7e2/ Jp2e4lYA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZazl-00027r-FC; Fri, 15 May 2020 14:07:25 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E1D11300261; Fri, 15 May 2020 16:07:20 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C8A8E202E0F9C; Fri, 15 May 2020 16:07:20 +0200 (CEST) Date: Fri, 15 May 2020 16:07:20 +0200 From: Peter Zijlstra To: David Laight Cc: Marco Elver , Will Deacon , kasan-dev , LKML , Thomas Gleixner , "Paul E. McKenney" , Ingo Molnar , Dmitry Vyukov Subject: Re: [PATCH v5 00/18] Rework READ_ONCE() to improve codegen Message-ID: <20200515140720.GE2940@hirez.programming.kicks-ass.net> References: <20200513165008.GA24836@willie-the-truck> <20200513174747.GB24836@willie-the-truck> <20200513212520.GC28594@willie-the-truck> <20200514110537.GC4280@willie-the-truck> <20200514142450.GC2978@hirez.programming.kicks-ass.net> <26283b5bccc8402cb8c243c569676dbd@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26283b5bccc8402cb8c243c569676dbd@AcuMS.aculab.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 15, 2020 at 01:55:43PM +0000, David Laight wrote: > From: Peter Zijlstra > > Sent: 14 May 2020 15:25 > .. > > Exact same requirements, KASAN even has the data_race() problem through > > READ_ONCE_NOCHECK(), UBSAN doesn't and might be simpler because of it. > > What happens if you implement READ_ONCE_NOCHECK() with an > asm() statement containing a memory load? > > Is that enough to kill all the instrumentation? You'll have to implement it for all archs, but yes, I think that ought to work.