Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp5434482ybx; Sun, 10 Nov 2019 13:13:56 -0800 (PST) X-Google-Smtp-Source: APXvYqzq2174Cv4MuJ8oBPLnjx6adOHerh/Y9KnvqssDnTq5htxlBAOPwKFnvAQak/N+DJjoXtTb X-Received: by 2002:a17:906:1c07:: with SMTP id k7mr6274614ejg.229.1573420436011; Sun, 10 Nov 2019 13:13:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573420436; cv=none; d=google.com; s=arc-20160816; b=EtYi9XlkUxiwTr+0q8lGXNO7hx8wf5Kg9SLlPnSeV19aAfr1y7jBFbmKghWAvU0uZf 3nHTeEJLGgcIro3X1RVynVGXHuCi7OEWY8doc/otL/Gm9KlJ9dhf2mFLVa8fl31ZegnH il7Ys79yLaqK+h1K8BKx2f79jI9ZygIMHFXy+zWj/rI4pSzH+S0i5Q/hwYcaRgOsRxYD 6XRkTP8zXJK9q7GMrBpXuI2ORtVms39OaMK1x134ZE8/WDZSr8YupCq0PPNCoZD+MkuA gJIfD8VVrnZqGtY31J4a5ylfMch3tsgr6JscqpNxCFHgLstPabz6ZBMh8F55Zq0PbgFb TkSQ== 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=sw0pGWOp+H0Cc/o3nartd+rrdu30v5KC8Ks0EukSTW0=; b=uB5ppuK5f1YxcWc7XGXYKkuLDhjQrOARBVC/mpi9CnQMC8qjDJRoFyEk7osCr1cG8Z 9CxEUq4Vq0MlRza2RXYYqLUuKWYPahZYmtgflJmPbyL3fOurwpcp70K7HHyfZ5X4YBr+ iB7r1X2aFsdS/zJe0ALOauOuH1ggxd/T2taGtSHuweroutLP3XrMtWCGMWcRjo0r4zQ3 RuQ5oqwHAGSLMPyyKYlp4pdTwNoJAPxf7T4e144kR03Pe+SDAJSSNIZzjDVV6GOtDtKH HJhB5i0XFRSQWBKmiT/HmIpmoGmZirWoPzAepV4OWi3+V2X1g3LKPh//C+tyHRuLDBZi AgEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=RAfCRzWX; 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 i13si8125265ejc.76.2019.11.10.13.13.32; Sun, 10 Nov 2019 13:13:55 -0800 (PST) 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=@linux-foundation.org header.s=google header.b=RAfCRzWX; 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 S1727134AbfKJVLC (ORCPT + 99 others); Sun, 10 Nov 2019 16:11:02 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:33007 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727047AbfKJVLB (ORCPT ); Sun, 10 Nov 2019 16:11:01 -0500 Received: by mail-lj1-f194.google.com with SMTP id t5so11612293ljk.0 for ; Sun, 10 Nov 2019 13:11:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sw0pGWOp+H0Cc/o3nartd+rrdu30v5KC8Ks0EukSTW0=; b=RAfCRzWXqkBygzjvTQF7B/q3F9bZcWhNFKa+vgcKxcPhwpgR7QOlK6Eii8RWszMJSj /GKxKFp6PJbUk5mDWk1Rs08zEWAX5Km6Ng5cuqqTumC+Wxu94ZiBemBAFzFqqkBvwDF2 D0F/g+SzyQvat+TyfcmfcY6DipCQs83wis1FY= 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=sw0pGWOp+H0Cc/o3nartd+rrdu30v5KC8Ks0EukSTW0=; b=A49Dho0UMSVLkQuQ3hbiVNu4CRJVCR6rv0uroUpJFUNY4ei6Ll1YXE67NEqsZTlo5a KTfiUmkwUKW+olpbLHAKwMFJWO9BN8yKcKtm4xY61mP3eOHWRnPfnU6ET3YqReGBNt7H CvADslccT3kxiS07c9qeUOy4QnBBwdp1EkV6qE8IjPziCJortPXjIWz077JdehL4ySn9 RGkp7lWKqW4rIQ3uw50lQijDiUNyR0/bmiAYhmUX0PFXqM9o7T/TzWBHswgWdNMMy6yl r2mj1BCM+vYlx9yuXJ0AJAZ9l56A/WA666tzMjx2JCORIF/gv8wsNw4nFnx7XAZqE/p8 j6HA== X-Gm-Message-State: APjAAAUgCgAzW7X9b91efotPAZJGpENWp9J4tR6Xwg0SH4ZiPXJrRT8q d68RCYxmZndaLH/XUgNFz2O5XUFLh+c= X-Received: by 2002:a2e:b4eb:: with SMTP id s11mr13566744ljm.38.1573420258326; Sun, 10 Nov 2019 13:10:58 -0800 (PST) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com. [209.85.208.169]) by smtp.gmail.com with ESMTPSA id u2sm11915600ljg.34.2019.11.10.13.10.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Nov 2019 13:10:56 -0800 (PST) Received: by mail-lj1-f169.google.com with SMTP id e9so11543348ljp.13 for ; Sun, 10 Nov 2019 13:10:56 -0800 (PST) X-Received: by 2002:a2e:8809:: with SMTP id x9mr13861151ljh.82.1573420256107; Sun, 10 Nov 2019 13:10:56 -0800 (PST) MIME-Version: 1.0 References: <20191110204442.GA2865@paulmck-ThinkPad-P72> In-Reply-To: <20191110204442.GA2865@paulmck-ThinkPad-P72> From: Linus Torvalds Date: Sun, 10 Nov 2019 13:10:39 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: KCSAN: data-race in __alloc_file / __alloc_file To: "Paul E. McKenney" Cc: Alan Stern , Marco Elver , Eric Dumazet , Eric Dumazet , syzbot , linux-fsdevel , Linux Kernel Mailing List , syzkaller-bugs , Al Viro , Andrea Parri , LKMM Maintainers -- Akira Yokosawa 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 Sun, Nov 10, 2019 at 12:44 PM Paul E. McKenney wrote: > > But will "one size fits all" be practical and useful? Oh, I do agree that if KCSAN has some mode where it says "I'll ignore repeated writes with the same value" (or whatever), it could/should likely be behind some flag. I don't think it should be a subsystem flag, though. More of a "I'm willing to actually analyze and ignore false positives" flag. Because I don't think it's so much about the code, as it is about the person who looks at the results. For example, we're already getting push-back from people on some of the KCSAN-inspired patches. If we have people sending patches to add READ_ONCE/WRITE_ONCE to random places to shut up KCSAN reports, I don't think that's good. But if we have people who _work_ on memory ordering issues etc, and want to see a strict mode, knowing there are false positives and able to handle them, that's a completely different thing.. No? Linus