Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp899446ybj; Sat, 21 Sep 2019 14:36:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlGbBItVhc5FUINC2nE/DFHLKOfGcdkd4zjEr63FzrCRx/7w7811B6OeTbUcEfKSSWwaB+ X-Received: by 2002:a05:6402:17a2:: with SMTP id j2mr11782054edy.121.1569101807790; Sat, 21 Sep 2019 14:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569101807; cv=none; d=google.com; s=arc-20160816; b=uGV54fxLwE5fTq8ukYaeefW/WtudQaLMZ3pkcHOeSY5lP6Nd/baViZwLtS8ZJ13Eur QAVS4i6YfC5NQODdFxqrerwy+zXkIiSLkDs8Ib77eB+oAKbfvjJ2JHoJcsgaMB1hsOy4 KAH2ohd5AoiI51gwtx/4QMjX77WuGYZiOEc7XkUT8Jmkfy0K9jTi3gBYfGNiwmowN9hW cW56pnPElm2dLUidw92XK3XOvnocD1wiLtEPVZYhR0WwnPiTBFjmajeyBX/W8Vqdszwc aykoXhSVIQcJEs+OljAcfKKfKG8BAcGSN/lLbhsyF6Ic7OLkNv6RfatYuD1zQiPOLd+H 0PvQ== 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 :mime-version:dkim-signature; bh=g3oaDqbgzggwPivHDVLZWW42Zmh9QYBbWFwvRIUuPVY=; b=TkLStPF16gOvzy+X+8XQn5nVL9gXNqvo04wR3jmW+VhY0ybK2E7KPY9AO5VXDlpTmg Lj3MH/iMsaZl4XLWZiAS6LPL6Zwx9cUSve3kej703MEVzvvBJQWhekKAphHQVaLtv7hT e+cvOxrDpr5ij1953fsb8w3YuBAqUOsws1vu504jENYqZBWVLuWTe/XJYCKTWb4LVzVi iZ0AOFouUo59JGXJKvB8nZI5kSr//z9l0B6AHs9hqvtO38NVzZ047X/tNEmhJ4FsaLTX G9pb82o7569FzgYjntstBcZiQhvLnj44Ry0IvRoH8vX1xU0mzQhZgwZoPeOoD+B5cN4/ AwsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="dRC/bCyN"; 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 v16si2830485ejo.128.2019.09.21.14.36.23; Sat, 21 Sep 2019 14:36:47 -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="dRC/bCyN"; 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 S2387797AbfITOTL (ORCPT + 99 others); Fri, 20 Sep 2019 10:19:11 -0400 Received: from mail-ot1-f41.google.com ([209.85.210.41]:39367 "EHLO mail-ot1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387778AbfITOTK (ORCPT ); Fri, 20 Sep 2019 10:19:10 -0400 Received: by mail-ot1-f41.google.com with SMTP id s22so6320318otr.6 for ; Fri, 20 Sep 2019 07:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=g3oaDqbgzggwPivHDVLZWW42Zmh9QYBbWFwvRIUuPVY=; b=dRC/bCyN0tevx36b1thR/vkPXJ4Ot0YA4qvripWUgW5TuKlI7aoY0IbhkQvjZr8DcL qgpJkd7OZFT9bmcWWbZL1S8yzjaMYm/FaowP0BATF7I8iIXeJkuyEhl0x223NcS+5cGv /U1EuIBrp8mzyOMlk2tPCUuu01GgcQzPD8jrQHINqsh9ZRhJ4Kf9iptFu0Zb07usQB+c 4qE9VaVP9ZpgTS/H1JXkvW4R7KvxhHYlo/ovkRF4nS+KobHA+D73tZKXMBYs5Ye6ZFGy 9UIO0kQMZ92qBGjSB+WLcroyeTvOyTIueOVJxpD1MFVDXTugmW1gZjKIK4ZD3hCyfIfM MtvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=g3oaDqbgzggwPivHDVLZWW42Zmh9QYBbWFwvRIUuPVY=; b=S5pNJwlN/Fxkmtr6FTOruhYz4mQ1v1pLmtHL3gewoCZFqOmcistVM2Mq48AGDnCdXW nBhKRVO1wgGIiCsDOBfXbSHkqDTedDnvk1BJynLnRIzeRxeBpDGVzHylEUixv04a2d9i CKo6sqD+WjyPEc99kpVczuE8kJf05pGpNFGZh+R7SVXuklkCiU/j8HZnlR5JcylLXwKk 1tWgis0nyrqgrrIQhgHD7tlF5YQZBX+I2fFT+K9KefBG9f4a9WZUoqLCjmxhOwz1KUBa GEyRqLFaDsoxY4U9l7Rp/1yyd43f/xYTdkEgrpeoPhlx4iGO3wL80DjaAOssawFbswww z/Pg== X-Gm-Message-State: APjAAAVnX1V3xi0eiN2D/EbrsYM7n6oW+eFqCTL5rb1z3YmTY5IJdQIM TtudQDSseLV7u974T1dnTw/guMTKBHJio2jyBToi3w== X-Received: by 2002:a9d:774b:: with SMTP id t11mr178617otl.2.1568989149028; Fri, 20 Sep 2019 07:19:09 -0700 (PDT) MIME-Version: 1.0 From: Marco Elver Date: Fri, 20 Sep 2019 16:18:57 +0200 Message-ID: Subject: Kernel Concurrency Sanitizer (KCSAN) To: kasan-dev , LKML Cc: Dmitry Vyukov , Andrey Konovalov , Alexander Potapenko , paulmck@linux.ibm.com, Paul Turner , Daniel Axtens , Anatol Pomazau , Will Deacon , Andrea Parri , stern@rowland.harvard.edu, akiyks@gmail.com, npiggin@gmail.com, boqun.feng@gmail.com, dlustig@nvidia.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr 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 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? Feel free to test and send feedback. Thanks, -- Marco