Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp530426ybk; Fri, 15 May 2020 07:06:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcP7ZEmNa+vV2h1pZBV15loRIZD99qBwYwciPtfcryiefphuX3IbDUejilI3Fntc2YbJ2A X-Received: by 2002:a17:906:add7:: with SMTP id lb23mr3070825ejb.6.1589551593850; Fri, 15 May 2020 07:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589551593; cv=none; d=google.com; s=arc-20160816; b=y1YnrSmAm4Mfjg5rQUNG6wZT6RFv15HoECXRQFI64RlvByMoIuktJR3tbIZzCqTxgD MPiqx+pfwzshwAbG6jtNODW+IkTgHmz7gyt5TnX+Andgq0jpO2SQlQxJ7/RBR4z4UTM0 svytsq7wDFqumr64zEdeSbd6Zu8k1Y5JuaH9Eic/jtl4jp4fg792mdvkByOwXGN78gNA VKRF7OM7BZ7pukVNomVm5lwY1qzkeZ58V6TGeH9v5KrOhf/xk3yeAm+jkPrLB+aM/fTu Wyb37yGJlgC14VvrjC8pwp7jg9HW9zn6RflXP5dSCFYzwysL4TYTOnQgWb32NpXLqN4Q hXWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vhaGDwcFvYYQSyxtP5zz3pYpd2ByNv+4SWaajJkndn8=; b=ipnhrtMGhyGlEgIrvT4M9E8VaVmSZMJUxwh8dqStw1ZlD8t9sTIEbX76Qhf6IPnCvZ 9SJ0rGXC9512dUJx+ykJiEqGtRFnT09+trNM4mK1gsTPJ7eH4HGC6r46qQtIKfRFY+05 1xtFOjbbgkf48LJlw/OVc5MgfS/ANYSGvcNw5S4us6tsP137FYsZKpvFmOMeYphIomLf mzw+A/CKBnM3Yw//p7D6err7pEwZH8JAwpdq6X//45ZMFlQjzaRi1bfKTzBYWsm1qfiu EEw6f35EiYZxNf9iz7SAGf94CAz/4p5MmrmIq3gsl5+YlNJy3qOpsp+su4+vR75iWuTV xKyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=KNORJ8kq; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b18si1319179edr.76.2020.05.15.07.06.07; Fri, 15 May 2020 07:06:33 -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=pass header.i=@google.com header.s=20161025 header.b=KNORJ8kq; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726240AbgEOOEr (ORCPT + 99 others); Fri, 15 May 2020 10:04:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726168AbgEOOEq (ORCPT ); Fri, 15 May 2020 10:04:46 -0400 Received: from mail-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C44AC061A0C for ; Fri, 15 May 2020 07:04:46 -0700 (PDT) Received: by mail-ot1-x343.google.com with SMTP id d26so1955625otc.7 for ; Fri, 15 May 2020 07:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vhaGDwcFvYYQSyxtP5zz3pYpd2ByNv+4SWaajJkndn8=; b=KNORJ8kq1Gen0hNTu+37ufRX5aY4Kmr1hzRvbwKE0DfzoEa3SOU3xL1PAqVLsacebr DTumFHmRLk4FIG2nR6g+CfRs9YRkX4Ai+PzMhQws78n6JDg8fqOKRmIL2bh9r154zD1I wgZxznRoGzaCIaSugoJgNPMBKMbGPipgOFukxiWtcclx73cUfXAuWEPHXNl2aNtFfahF MgE0AMilI6uvOLBsn84e+XVpwD1Ux0ah42r1/d6E0ztndkf4SgcqhhV4FmiPLm8AmgWh Iv4QuEBmwqw3e5lqMrtT7fbTeFjwn97jGjXKbB2QcFv3Kx0yGoyYZBaWk2R79xlh9az4 2ySA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vhaGDwcFvYYQSyxtP5zz3pYpd2ByNv+4SWaajJkndn8=; b=DzdU1Bl3PpKBKxX3cFYDqmFsitqPv4F3q2YXl/8z/maUbW5aqQSiRchfvwyjdIBWvd afEmhz2M4E1RLz6BWJy4B09ZmpQlt6DNQQCNJQpTs1ga+6XRSx1P6ZJnwmlXsWNBq4dE sXZfK161izqVORrH72wosy772xVItkdkemyb/IjAUnllwwGTt+WZYPcs+bwyEVnZQMHh KPMbwWvt82N8OOmZm3NAoAhk4HkT7yRXiHQDG0WYb0XxiqmQDHcK8pPJx9zsZrPzLQDo voh7tqTI+uoSYzSn2sW9CJMTbS+7sU1fDZYp+Mr+tIuM+y/L6DUO14IUtPYt49YFVk9W OL0w== X-Gm-Message-State: AOAM530WXh6Pdy4SH6RYYqvCq+aVdMVyuZx080AVu5r6Df+BbdpLwklh TPHYGRmhUL9dgzXkAjog/DaOGY2Hk6e7JcpsAfrpaw== X-Received: by 2002:a9d:7608:: with SMTP id k8mr2547789otl.233.1589551485552; Fri, 15 May 2020 07:04:45 -0700 (PDT) MIME-Version: 1.0 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> <20200514142450.GC2978@hirez.programming.kicks-ass.net> <26283b5bccc8402cb8c243c569676dbd@AcuMS.aculab.com> In-Reply-To: <26283b5bccc8402cb8c243c569676dbd@AcuMS.aculab.com> From: Marco Elver Date: Fri, 15 May 2020 16:04:33 +0200 Message-ID: Subject: Re: [PATCH v5 00/18] Rework READ_ONCE() to improve codegen To: David Laight Cc: Peter Zijlstra , Will Deacon , kasan-dev , LKML , Thomas Gleixner , "Paul E. McKenney" , Ingo Molnar , Dmitry Vyukov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 May 2020 at 15:55, 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? Yes, it is. However, READ_ONCE_NOCHECK() for KASAN can be fixed if the problem is randomly uninlined READ_ONCE_NOCHECK() in KASAN_SANITIZE := n compilation units. KASAN's __no_kasan_or_inline is still conditionally defined based on CONFIG_KASAN and not __SANITIZE_ADDRESS__. I'm about to send a patch that does that for KASAN, since for KCSAN we've been doing it for a while. However, if that was the exact problem Peter observed I can't tell. Thanks, -- Marco