Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1351486ybk; Thu, 14 May 2020 06:58:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9AeZOh29vyGqFBOvIuaYez19p5h9ytlXeHngmLG2i5d5A9tVdGAit56ovlqMi5FIS0Tqk X-Received: by 2002:a50:9f85:: with SMTP id c5mr4107075edf.72.1589464716801; Thu, 14 May 2020 06:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589464716; cv=none; d=google.com; s=arc-20160816; b=S0Y92elltkiqHbS1W2Eg1J8iRn2W+U6i39iRnicVqiR+c+kfqKnK0W/atIa2SInUnI uuwPrUz1hkienjwxOlvEqRBW3X1Hlc9utmGNrRK2pTHVKrasnEh3JZOdaEci1dh37rh+ gt63uWhB9mJrw/Ocv2yeFKEDPmQsBL+IQEDTbbcHUipX9l/IfXLm4Onqr2DPsF4vQq30 Xw681Iy4Oo13BVdGR8h0qnxJZhRy27qS0zwE6FU6qtqpNV8uKETmw4Udec5icrgA2VWc zJj3Vk4LH1s6KpV6USrTsfYdorinchwSQgIkrZzZxnB7xYrqDbiEo5znoFaJk+BBwwBC 0rgQ== 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=yuNZv20GvjcB3xZG0jnCz4zo0tfhmHdfTS3Cc7Ab6N8=; b=wGvJeHQez+POBf3Di4Q/zvLxXok/O6KHydbvYOy4iFrN4xI4nouOijzEziFVZR5jqi C2bWQyXoS0DXq+I9Jj3d+i8RTL3b5/NhkUYxZ8O7uS4x8JxOlKgZzYMEv4WyhKiiVfJf bcQXUG5iKW40SHIs0x6vC7N0TM/H++RHKub3NvqCqT9AYAchkSNh2Yb539z18XalwHP0 bndeMPKJOYKKJylu6q0afhvFq55N0nyRSH1bf/7O4xg/adau7BnZKDvOq8gektmuUgA8 BLIzHxPQ0wCHO95+hxMarVb+D1BpYwHUNNkoYwCz5Ry9Kw2uDEYlR30IcI3jkDiGM6In v6gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ukgueQqJ; 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 a4si1701999edf.478.2020.05.14.06.58.13; Thu, 14 May 2020 06:58:36 -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=bombadil.20170209 header.b=ukgueQqJ; 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 S1726304AbgENN4q (ORCPT + 99 others); Thu, 14 May 2020 09:56:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726050AbgENN4p (ORCPT ); Thu, 14 May 2020 09:56:45 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A809C061A0C for ; Thu, 14 May 2020 06:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=yuNZv20GvjcB3xZG0jnCz4zo0tfhmHdfTS3Cc7Ab6N8=; b=ukgueQqJZ77CbN4yIO3mK6vCnP 9TzP7TKK5ROW/AwOsp+pUneoZpOHrIKvKb00mB8IhFn4bYTr5MP4gLLkiPyfZ/Bzx9FtOjLcfBvOH lOgdxXjMff+zMe+IWDlGW1Pnwsf2aVrAIucTVnHJLLL00JOY/2M5Vg8SQd8ttlQB5zLnQfVEzt/+c QsJy7cG2CfzY6kTHb6XSnlUkKRKPzIDdHDKILWsVhbmOXJokovvT8Y8bR2GLHcTBd2vjxodUp/kze epH/ujHLaMp1YccjnSht2i/68FrmkhUUDjKneI861j1Q8u2cd2CSYj3gJuu/mLRCTlunXxHDHTGQg 0FM4I34Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZELp-0004gL-EQ; Thu, 14 May 2020 13:56:41 +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 BC2F3302753; Thu, 14 May 2020 15:56:39 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A79DF2B852D67; Thu, 14 May 2020 15:56:39 +0200 (CEST) Date: Thu, 14 May 2020 15:56:39 +0200 From: Peter Zijlstra To: Marco Elver Cc: 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: <20200514135639.GA2978@hirez.programming.kicks-ass.net> References: <20200513124021.GB20278@willie-the-truck> <20200513165008.GA24836@willie-the-truck> <20200513174747.GB24836@willie-the-truck> <20200513212520.GC28594@willie-the-truck> <20200514110537.GC4280@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 14, 2020 at 03:35:58PM +0200, Marco Elver wrote: > 5. we should not break atomic_{read,set} for KCSAN. [Because of #1, > we'd need to add data_race() around the arch-calls in > atomic_{read,set}; or rely on Clang 11's -tsan-distinguish-volatile > support (GCC 11 might get this as well).] Putting the data_race() in atomic_{read,set} would 'break' any sanitized user of arch_atomic_{read,set}(). Now it so happens there aren't any such just now, but we need to be aware of that. I'm thinking the volatile thing is the nicest solution, but yes, that'll make us depend on 11 everything.