Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp462227ybn; Thu, 3 Oct 2019 07:34:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzcLG4G3NHpr1osoPW5u0jEbjTE3rjkFcEzk74ilogKU4NCLIdnvWHri31Xz98U3D5ja/11 X-Received: by 2002:a17:907:441d:: with SMTP id om21mr8271243ejb.188.1570113269886; Thu, 03 Oct 2019 07:34:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570113269; cv=none; d=google.com; s=arc-20160816; b=NVhh8niPtCCBArhJSrOD9/80uPPHc5i06J3e/Vaigle1D72sjdG8PGY2HRVTr4O3B2 xMRP1RhVkn+5Z4BaBLHpx4EVfdbYRdQDv9i3fsaBghzrZBugr9nZ9OFnCAjrbfRhylRc 3uQvukX0JigAuIjW8arxP5vr7ILllpYqsaorDcoI3buU+UKzi09KTGn2nNhZnA8aH+MH vtMF9C3vCnn+N+3AQPCRMfWdtvTmYa+Oszfoq/+ykd7VN4wJoiQOmfqwCeG0eRVeIvcm Pk/zzI99IUES/MnH44VB2HEXITiiTlT649lG91DoZe4lNe6VcUS7gZ3xsiPjhgO+NdJL kDiQ== 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=hjQvtW5KCBAhxkXZKBpTw3Thc1AXYBDLoKRUiQoeyvg=; b=hvU4l5tsMOnca6+xwFJs63HvGkuPEAQXxSsWEizQlXQHe+6eGQGqg7h1yHChcn7vmi LggVJovtiRY8dRUFqm8SDQflCmrSFLQqOGspoGvdPe1f1Tj2mfndz7VLiO6xZq6UpfVm wyb+ayCMw3i32csuMVARksYUyljBRnBfBBvAS0VEILJvkASyZ9zEd140s1EveOdZ6/gL OhtUUxsUorbLkw78KdMMmaQW39ZRTCEg1heCd78ObV/lITQuq5qmSVBYX3+752NkM6el u2rpAo+VWgsSs6Oup1JteASdspgWsT/dFCuZ4kLwSXAlnEH8uUextU6gcA8E+z55G5CI 3vEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ux5nAYlQ; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ec21si1298181ejb.26.2019.10.03.07.34.04; Thu, 03 Oct 2019 07:34:29 -0700 (PDT) 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=@google.com header.s=20161025 header.b=Ux5nAYlQ; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728190AbfJCNOM (ORCPT + 99 others); Thu, 3 Oct 2019 09:14:12 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:36873 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726811AbfJCNOL (ORCPT ); Thu, 3 Oct 2019 09:14:11 -0400 Received: by mail-qt1-f196.google.com with SMTP id l3so3496781qtr.4 for ; Thu, 03 Oct 2019 06:14:11 -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=hjQvtW5KCBAhxkXZKBpTw3Thc1AXYBDLoKRUiQoeyvg=; b=Ux5nAYlQ9Yn7WG4UF2qw8RylFHuO0L2HAo44axKf7TjfqtzcRmqlAvj5ARzygQgGOG MzogY0KlYe/FjCgm9/0ZusfW72VRZ4uZy4dtdc56HnzEtkXKD4NyaVsb4AUA5yYFbqrf SYAxgM1GhM4icx9dGx5eFCM97/i89UM/WRpfhjtZlI9YWy7XuuXMFSQQsL2eDd/pCum4 f+uEOCLuG4B7mxdRAa3g5TMmEHye4gWNbYmYWmaDrd5ZRAPEOqYnwjrTvZesj1SkO1XD FCVR7HRuRimHgkHGjbY0uAgv124H6+Plyl8559oe5aeIN69KCrYZvRes+PjDqG/aKjbx uFjA== 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=hjQvtW5KCBAhxkXZKBpTw3Thc1AXYBDLoKRUiQoeyvg=; b=R7+AMMTc0TqsOTbS96K96HgEZU70QSC4rVryWQnjw+WaUVqiuXBUoqwYlGKM5L0fTW R1ooMgFwWY2ru9e6KmfPO0wSSrzOTkehUVI98JeC7fTTSotM3MtcRs9Q3858TPlIFF7N 4p+E8Maye52J86rsrLIU0YrhTaqkHZlTS39ZFnlxjyhjjUyWr3GkhIWhm0wBucNBk1V+ f/d3YmJEO6r37jcpX11tvMd4lgk0XgXxPo1J2eqvcv1hqaizwWvrq/qVmGU1WzddmR6u 8DClZhLrBJhVut+AAgds67bFs0yPNgauewSBw9uJ81WkdmDNkJY6Tma/JR5ffHtZSAzN /GVw== X-Gm-Message-State: APjAAAXQvE7b+TjmJmBAFxRn/14F89qZeKXgszlSH01Rs7FPgaiPg9R0 RehWbX2sP5YkolT1XZiGckDu9EZLWb1nWS45r2KShA== X-Received: by 2002:ac8:7642:: with SMTP id i2mr9488940qtr.57.1570108450446; Thu, 03 Oct 2019 06:14:10 -0700 (PDT) MIME-Version: 1.0 References: <20191001211948.GA42035@google.com> In-Reply-To: From: Dmitry Vyukov Date: Thu, 3 Oct 2019 15:13:57 +0200 Message-ID: Subject: Re: Kernel Concurrency Sanitizer (KCSAN) To: Marco Elver Cc: Joel Fernandes , kasan-dev , LKML , Andrey Konovalov , Alexander Potapenko , "Paul E. McKenney" , Paul Turner , Daniel Axtens , Anatol Pomazau , Will Deacon , Andrea Parri , Alan Stern , LKMM Maintainers -- Akira Yokosawa , Nicholas Piggin , Boqun Feng , Daniel Lustig , Jade Alglave , Luc Maranget 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 Wed, Oct 2, 2019 at 9:52 PM Marco Elver wrote: > > Hi Joel, > > On Tue, 1 Oct 2019 at 23:19, Joel Fernandes wrote: > > > > On Fri, Sep 20, 2019 at 04:18:57PM +0200, Marco Elver wrote: > > > Hi all, > > > > > > We would like to share a new data-race detector for the Linux kernel: > > > Kernel Concurrency Sanitizer (KCSAN) -- > > > https://github.com/google/ktsan/wiki/KCSAN (Details: > > > https://github.com/google/ktsan/blob/kcsan/Documentation/dev-tools/kcsan.rst) > > > > > > To those of you who we mentioned at LPC that we're working on a > > > watchpoint-based KTSAN inspired by DataCollider [1], this is it (we > > > renamed it to KCSAN to avoid confusion with KTSAN). > > > [1] http://usenix.org/legacy/events/osdi10/tech/full_papers/Erickson.pdf > > > > > > In the coming weeks we're planning to: > > > * Set up a syzkaller instance. > > > * Share the dashboard so that you can see the races that are found. > > > * Attempt to send fixes for some races upstream (if you find that the > > > kcsan-with-fixes branch contains an important fix, please feel free to > > > point it out and we'll prioritize that). > > > > > > There are a few open questions: > > > * The big one: most of the reported races are due to unmarked > > > accesses; prioritization or pruning of races to focus initial efforts > > > to fix races might be required. Comments on how best to proceed are > > > welcome. We're aware that these are issues that have recently received > > > attention in the context of the LKMM > > > (https://lwn.net/Articles/793253/). > > > * How/when to upstream KCSAN? > > > > Looks exciting. I think based on our discussion at LPC, you mentioned > > one way of pruning is if the compiler generated different code with _ONCE > > annotations than what would have otherwise been generated. Is that still on > > the table, for the purposing of pruning the reports? > > This might be interesting at first, but it's not entirely clear how > feasible it is. It's also dangerous, because the real issue would be > ignored. It may be that one compiler version on a particular > architecture generates the same code, but any change in compiler or > architecture and this would no longer be true. Let me know if you have > any more ideas. > > Best, > -- Marco > > > Also appreciate a CC on future patches as well. > > > > thanks, > > > > - Joel > > > > > > > > > > Feel free to test and send feedback. FYI https://twitter.com/grsecurity/status/1179736828880048128 :)