Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6501697ybx; Mon, 11 Nov 2019 10:08:51 -0800 (PST) X-Google-Smtp-Source: APXvYqyTuVJzj3gEI/zrFCmkp2b/3jky/Pr/dvr+K8EM8K2aeOgT2/zfWNxYs4WQ+WayJytChOaW X-Received: by 2002:a05:6402:158d:: with SMTP id c13mr27601674edv.62.1573495731553; Mon, 11 Nov 2019 10:08:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573495731; cv=none; d=google.com; s=arc-20160816; b=Eg9ULbpXsZH+O+gkkhTG+bRwuKUhSL6x0yPfxDAQll2GPy7Oc01/MxIZ0tHs+gKY+J j1yeNzarXTq1Ptfiy5Hb3/GmPnSQE+yUKjsuij/x3KfdthsYNAQiwvgNQX1y/heR8Ljt afMy6HFADB6OZFvOmUSt9BAv9VF4yQtzk156h6E+mAfmEhUwFS+VPyLhlhjCbPh3zfv1 A8i/XLaoIFGERfUtQa+BXPEe+bJQg9+iiQOZD3LwujWJyCONArBpPL41f7k+ZIzvbcms brRgEDcRuHgCklPUA3QZc1uER0jGRm23sJegx/gG04QiCa3dsZI1UOniJI83Ry/x82SD tJiw== 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=NvHuArWQZSt4FAfTL9KeJpBsocvaDQs9zK3jRy53Tcc=; b=LgDRFnvpR/qgSboPCMV60YCfwA7p9QDxvoUJ1UXx+DSPhnRql/hxiOYkfNOHwBc/1Q 8Unw3uv5KA/1UhE8ppqqjuPTUrRr8ig6EerJFv/kVYVHjX9c+p6dEFrRus3IYoj+oS21 Ep13kuNLoclYNCs8GcwztynjIrc15yJthx/ZL1Qg936cMJOi6uPjm8wGCcw15WbQ0ui4 A2fQNowpj5L6/uB3bc96fIcJlip+5XEZng7h0ceOfg9Hxpin3HouJUt9Cy9FKThN8t3U WqgCKPvyMnEQjp2DSmg/s9f7scGwzPXnUH3fFoPRW6zZx3IcI7cUG6v60MQ9bPog+4Lm OpHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=ag0ij2l3; 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 19si11135358edz.85.2019.11.11.10.08.27; Mon, 11 Nov 2019 10:08:51 -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=ag0ij2l3; 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 S1726912AbfKKSFR (ORCPT + 99 others); Mon, 11 Nov 2019 13:05:17 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35621 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726845AbfKKSFR (ORCPT ); Mon, 11 Nov 2019 13:05:17 -0500 Received: by mail-lj1-f194.google.com with SMTP id r7so14826288ljg.2 for ; Mon, 11 Nov 2019 10:05:15 -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=NvHuArWQZSt4FAfTL9KeJpBsocvaDQs9zK3jRy53Tcc=; b=ag0ij2l3tpP9oh4bJbAnRGep+63OugvYZJhjMCwlauwgfrGQ7pqUmJvv8qj0uakSts ZDSkRSJFWChbxsuYWUpcogXRNaLW+mnwqdTCozn5LsyQqxp2G8J+ESzbHFLEaLpk8fc1 Wny6vPFLNuEJ1jLedmt1cN279S4odF0GC9reA= 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=NvHuArWQZSt4FAfTL9KeJpBsocvaDQs9zK3jRy53Tcc=; b=eYxB1ChF2BlqMjk/96kxg/FKtAfCYj43KWMnPddUa5kie5C8eqyJX95HJGyQioUMDQ a41sAIOzEUJX6K1pio1JOoMnCbqBBmxOML1nnNHPnJfobISMDxJIMX1izsIsi0oYyfi0 62e/D1/ANm7//1XPag4xgMFWD83bkt03JGtqh4Xv0dMclI4pNuh6yDiu7T65au2I5N0p 09j57xzCH7vCLmunQE3SUc+MQN1PVLtSJNfeFYkUbue5jTzgZ4Uf3fDyIaKiXlzDHFjj QB1AX04vNjzSZ+8GVwUCHIx07Sv0xloq4QVLC0tfRbatYFRzhN2TroM0Kca4PPlbFU2q e8SA== X-Gm-Message-State: APjAAAVZWHf9cxpGCUt6ZYaSdZVH05nVNjk5jgwhl9qpcXCz6vRX2GjG vbN0Z4iFeIY2VefKVGXicwG0PwEOXKE= X-Received: by 2002:a2e:b4f0:: with SMTP id s16mr8187414ljm.123.1573495514543; Mon, 11 Nov 2019 10:05:14 -0800 (PST) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id c12sm8732853ljk.77.2019.11.11.10.05.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Nov 2019 10:05:11 -0800 (PST) Received: by mail-lf1-f46.google.com with SMTP id b20so10594467lfp.4 for ; Mon, 11 Nov 2019 10:05:11 -0800 (PST) X-Received: by 2002:ac2:498a:: with SMTP id f10mr4549583lfl.170.1573495511138; Mon, 11 Nov 2019 10:05:11 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Mon, 11 Nov 2019 10:04:54 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: KCSAN: data-race in __alloc_file / __alloc_file To: Eric Dumazet Cc: Alan Stern , Marco Elver , Eric Dumazet , syzbot , linux-fsdevel , Linux Kernel Mailing List , syzkaller-bugs , Al Viro , Andrea Parri , "Paul E. McKenney" , 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 Mon, Nov 11, 2019 at 9:52 AM Eric Dumazet wrote: > > Now I wonder what to do with the ~400 KCSAN reports sitting in > pre-moderation queue. So regular KASAN reports are fairly easy to deal with: they report actual bugs. They may be hard to hit, but generally there's no question about something like a use-after-free or whatever. The problem with KCSAN is that it's not clear how many of the reports have been actual real honest-to-goodness bugs that could cause problems, and how many of them are "this isn't actually a bug, but an annotation will shut up KCSAN". My gut feeling would be that it would be best to ignore the ones that are "an annotation will shut up KCSAN", and look at the ones that are real bugs. Is there a pattern to those real bugs? Is there perhaps a way to make KCSAN notice _that_ pattern in particular, and suppress the ones that are "we can shut these up with annotations that don't really change the code"? I think it would be much better for the kernel - and much better for KCSAN - if the problem reports KCSAN reports are real problems that can actually be triggered as problems, and that it behaves much more like KASAN in that respect. Yes, yes, then once the *real* problems have been handled, maybe we can expand the search to be "stylistic issues" and "in theory, this could cause problems with a compiler that did X" issues. But I think the "just annotate" thing makes people more likely to dismiss KCSAN issues, and I don't think it's healthy. Linus