Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp573340ybn; Thu, 3 Oct 2019 09:03:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSOlRYek5+/nd38/hdJ4WaCYm4tooAurGlSF5EB9pXttNA2l7cO+03MF9+POMFBaVmxY0F X-Received: by 2002:a17:906:b84e:: with SMTP id ga14mr8355748ejb.215.1570118608174; Thu, 03 Oct 2019 09:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570118608; cv=none; d=google.com; s=arc-20160816; b=i8FARuIFLhZ6pjVZU802cR0CH9wgqPPt7ZwYEXAraQ2NNlpBlD2gaGYahgX8h5zsNt 1kZw/XfYnBwlBYykIUpqYQ/NlscE69TWl53G0ekxpGyn9f1iN1D/PBQ7+njeEm1hODmQ CmiWMcGlD6Tm0MT43UH7iZ9Y1cP9NsEihiSwejnwW2mWd9BD4vGo6krQTVHo7lZL1BSR bUJ7BUqE73gYc99Jab4SpCBKVQX2iMVQ7gb9Sb29yaGDvJz9z38iE2RznGXGGOwQsOrd Nmv+ptU0pckFmomSX/6NkjQGrTlXq+WFpI+xePt94FwHefWad/fOeLB84iQP2//b8uSi v6pA== 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=WHlhVUvFqch680wlgcRKCc65z2j3hwVlcjsPrmD0yPY=; b=HoiMS2ajZodx5pO9WdCsXiuYaACDwufYRqe2UZTY/VdioU5pQxUv/MF5Qjv+S0YatT mB75ccslo6LwDAwIl7algTJiEmDeBvHr4yDOeYi9LsqTwcHiPg4O/DQR4Qoh9hd30gGb dPhlrML6Q39f6ZoMLUvRFfC+64SZcYpuDWy70BTG7dgFnt+rKbvk7c5OmcKS3It9ZR4R p3T+O1qmXo7fR2xQ9puuwasrgnY3mfLSLUA3K1NXtGLujCkJeKL+ZVMjPAiTllbgCdkL HdsILtBa3oNMps4oliUU+YbsiOiRwX9hfq/sk/49+wx3kFsu4yBbPI8fBcrQT/ner2K1 ax/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=n69rlZo+; 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 la20si291384ejb.73.2019.10.03.09.03.02; Thu, 03 Oct 2019 09:03:28 -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=n69rlZo+; 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 S1729193AbfJCQAy (ORCPT + 99 others); Thu, 3 Oct 2019 12:00:54 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:35863 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731644AbfJCQAw (ORCPT ); Thu, 3 Oct 2019 12:00:52 -0400 Received: by mail-qt1-f193.google.com with SMTP id o12so4329190qtf.3 for ; Thu, 03 Oct 2019 09:00:51 -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=WHlhVUvFqch680wlgcRKCc65z2j3hwVlcjsPrmD0yPY=; b=n69rlZo+yOLc/EmziRkwRlvjCx5SWOGz+Ap4YoTfo+AQCgGMj+280TsW+KTXzRGpJq KExcaSPjwVtN5UxZtTVkiTu1oFtZmDjjSFUhzoUymytly2b2c7LXQXsspaEsT/yCIUgn OhIB9Kx5HSQL6/Z/NrN9ytAYBs2PYzCDJb9mEcY6UlF7wElr1dvhv+yrCRbUoiOIUTb2 pLEmUqWtC7aeHQgGzgTGpsUjQBHUsbaZG/7/CwBtRCkpFnCGwsCO2YK1CSP/N/6VhAl9 sol16PrnH5BIq5WXRJSq6DtqXaDkY20X/vutZUCbwnrQ5NU5W/Xwnx51FyAp3kMMhqA0 Ihcg== 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=WHlhVUvFqch680wlgcRKCc65z2j3hwVlcjsPrmD0yPY=; b=GXCpZeqU/KIESorKlCabPvpCW9baet0OGcjmWT0Eeo3T9j2pqJQdyrH2pktZ/hGU4T aRf+LSFNAP3pZ5FGEaYvhUfDB5IP8T6+peCbn7vOJ3+8gVkCOHCgCu+5VYXaFPgrvDCX p76ZdWn0QI72voz6HsxNVO3Teb3KNpBiwQy0eVjM3SJJDGA8JDfz9MHyoXdbR2MkMzbI 66Tpz/+4fhCbnN9r9926AJsenCRMZvmdJz+TXUrEs9coFVPvKxBK1924XaZug9ymG0QB vkj6+Wo7DIsu14jfrhC43QslJd+kuDcBB8tDu/OyVcB/LYLY328fD6jo3zjAMfhjWJ/S PKeA== X-Gm-Message-State: APjAAAWJJKOTm8BB8tUoAFOJdc2G/vOHGQsXgm2vFsiYUBQ1Xl59WiTc RV5XElS0NeFlaKGSbHNZVq6OM/3zjG8xGjvix2xXeQ== X-Received: by 2002:ac8:7642:: with SMTP id i2mr10304461qtr.57.1570118450459; Thu, 03 Oct 2019 09:00:50 -0700 (PDT) MIME-Version: 1.0 References: <20191001211948.GA42035@google.com> In-Reply-To: From: Dmitry Vyukov Date: Thu, 3 Oct 2019 18:00:38 +0200 Message-ID: Subject: Re: Kernel Concurrency Sanitizer (KCSAN) To: Marco Elver , Christian Brauner 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 Thu, Oct 3, 2019 at 3:13 PM Dmitry Vyukov wrote: > > 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 :) +Christian opts in for _all_ reports for kernel/{fork,exit,pid,signal}.c and friends. Just wanted it to be written down for future reference :)