From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C2F4ECE58E for ; Thu, 17 Oct 2019 14:15:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D95B220854 for ; Thu, 17 Oct 2019 14:15:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Kv2dqE7D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D95B220854 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8B34E8E0005; Thu, 17 Oct 2019 10:15:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 863D58E0003; Thu, 17 Oct 2019 10:15:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7794A8E0005; Thu, 17 Oct 2019 10:15:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0195.hostedemail.com [216.40.44.195]) by kanga.kvack.org (Postfix) with ESMTP id 577BA8E0003 for ; Thu, 17 Oct 2019 10:15:35 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id D1C4F181AEF3E for ; Thu, 17 Oct 2019 14:15:34 +0000 (UTC) X-FDA: 76053474588.23.shoe03_6ad3253a32f2d X-HE-Tag: shoe03_6ad3253a32f2d X-Filterd-Recvd-Size: 8972 Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Thu, 17 Oct 2019 14:15:33 +0000 (UTC) Received: by mail-oi1-f194.google.com with SMTP id k9so2265564oib.7 for ; Thu, 17 Oct 2019 07:15:33 -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=gNom0VFlbRYX78r4OKfXRzBJyj1ZzMem6+U6GRAPZGs=; b=Kv2dqE7DBOjguEO+g1W15SDaL2UD4S+vcY1QNPVx8SnJ2E5T2gdGww8rE+GRAhGYAF ILBKEBvVHXtMZ3BmzKphs7G2RPP27C2X9+3swp8cGF2i/u/m66J9i9veo+ceI3Bj3osq MWlFe3gqzbgrf9H5LWLUoOvE3Mg2Hr3oEmfWcYTbw5kZC11hxu6xajsIp6aP88N8Ct22 ZTltpyBZZS0029i8Cfhdn6iROub4bj69y7h+zPK6we8swLKJcmbnUZt3w2D0PXT19Z7X n98Y+SLmGCkEjEMCpEuotp9DxZ2U01vOh+RKvP1EMnD5m2ntbhD2ntvxfPt1+/6e0XPl W8yw== 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=gNom0VFlbRYX78r4OKfXRzBJyj1ZzMem6+U6GRAPZGs=; b=I/icOWLbQE9KMmu1jiszi9Bz5NRlc2tEA9QymRy6x8O37EwqVVAe9y8SdHMOdN6SDd SZz2ak+/xjo77sRFckqbCemQrC6U6BVSJdqwUmi0YZfvnp430SiGDm+QspJJIaPSlCsu 9Wm9BuIQJlZ3hEtDnagZJ6ZOtZ1hAOHT9f8F5tTGDA1uwXxI0cXGf1YnrGqdV83Xl3M8 7NAzijrx9UbNTrr/wpiNFx8bbYXYvaAYOG6L418bq+Ui/WOJLg/JrHZ9T6rXN4AZCLMd n3+4ipf4ffCTci5d7b5KIOBAWbtQLj2YFrNdu2XvqS2op/dDDsgGywTN6eAJ6z7Dpq0P sqeg== X-Gm-Message-State: APjAAAXttMnZojXIqSH6hKPB2p5+d6cp7tdp8N19PdltUJU1JREJy2tv nLrJateWLCR836UeB8qiPzsujnRV0ZlknlAVpmiYiA== X-Google-Smtp-Source: APXvYqyuauWsvEE+jliJ5S7S3Gh0NvhZGewq3BAb0qQ2dVeR8Gj7daShagq5yO57tbCuu+twdnA3Uh6Z3wF+KW7VHrc= X-Received: by 2002:aca:5015:: with SMTP id e21mr3502104oib.121.1571321732803; Thu, 17 Oct 2019 07:15:32 -0700 (PDT) MIME-Version: 1.0 References: <20191016083959.186860-1-elver@google.com> In-Reply-To: <20191016083959.186860-1-elver@google.com> From: Marco Elver Date: Thu, 17 Oct 2019 16:15:20 +0200 Message-ID: Subject: Re: [PATCH 0/8] Add Kernel Concurrency Sanitizer (KCSAN) To: Marco Elver Cc: LKMM Maintainers -- Akira Yokosawa , Alan Stern , Alexander Potapenko , Andrea Parri , Andrey Konovalov , Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Boqun Feng , Borislav Petkov , Daniel Axtens , Daniel Lustig , dave.hansen@linux.intel.com, David Howells , Dmitry Vyukov , "H. Peter Anvin" , Ingo Molnar , Jade Alglave , Joel Fernandes , Jonathan Corbet , Josh Poimboeuf , Luc Maranget , Mark Rutland , Nicholas Piggin , "Paul E. McKenney" , Peter Zijlstra , Thomas Gleixner , Will Deacon , kasan-dev , linux-arch , "open list:DOCUMENTATION" , linux-efi@vger.kernel.org, Linux Kbuild mailing list , LKML , Linux Memory Management List , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, 16 Oct 2019 at 10:41, Marco Elver wrote: > > This is the patch-series for the Kernel Concurrency Sanitizer (KCSAN). > KCSAN is a sampling watchpoint-based data-race detector. More details > are included in Documentation/dev-tools/kcsan.rst. This patch-series > only enables KCSAN for x86, but we expect adding support for other > architectures is relatively straightforward (we are aware of > experimental ARM64 and POWER support). > > To gather early feedback, we announced KCSAN back in September, and > have integrated the feedback where possible: > http://lkml.kernel.org/r/CANpmjNPJ_bHjfLZCAPV23AXFfiPiyXXqqu72n6TgWzb2Gnu1eA@mail.gmail.com > > We want to point out and acknowledge the work surrounding the LKMM, > including several articles that motivate why data-races are dangerous > [1, 2], justifying a data-race detector such as KCSAN. > [1] https://lwn.net/Articles/793253/ > [2] https://lwn.net/Articles/799218/ > > The current list of known upstream fixes for data-races found by KCSAN > can be found here: > https://github.com/google/ktsan/wiki/KCSAN#upstream-fixes-of-data-races-found-by-kcsan Sent v2: http://lkml.kernel.org/r/20191017141305.146193-1-elver@google.com Many thanks, -- Marco > Marco Elver (8): > kcsan: Add Kernel Concurrency Sanitizer infrastructure > objtool, kcsan: Add KCSAN runtime functions to whitelist > build, kcsan: Add KCSAN build exceptions > seqlock, kcsan: Add annotations for KCSAN > seqlock: Require WRITE_ONCE surrounding raw_seqcount_barrier > asm-generic, kcsan: Add KCSAN instrumentation for bitops > locking/atomics, kcsan: Add KCSAN instrumentation > x86, kcsan: Enable KCSAN for x86 > > Documentation/dev-tools/kcsan.rst | 202 ++++++++++ > MAINTAINERS | 11 + > Makefile | 3 +- > arch/x86/Kconfig | 1 + > arch/x86/boot/Makefile | 1 + > arch/x86/boot/compressed/Makefile | 1 + > arch/x86/entry/vdso/Makefile | 1 + > arch/x86/include/asm/bitops.h | 2 +- > arch/x86/kernel/Makefile | 6 + > arch/x86/kernel/cpu/Makefile | 3 + > arch/x86/lib/Makefile | 2 + > arch/x86/mm/Makefile | 3 + > arch/x86/purgatory/Makefile | 1 + > arch/x86/realmode/Makefile | 1 + > arch/x86/realmode/rm/Makefile | 1 + > drivers/firmware/efi/libstub/Makefile | 1 + > include/asm-generic/atomic-instrumented.h | 192 ++++++++- > include/asm-generic/bitops-instrumented.h | 18 + > include/linux/compiler-clang.h | 9 + > include/linux/compiler-gcc.h | 7 + > include/linux/compiler.h | 35 +- > include/linux/kcsan-checks.h | 116 ++++++ > include/linux/kcsan.h | 85 ++++ > include/linux/sched.h | 7 + > include/linux/seqlock.h | 51 ++- > init/init_task.c | 6 + > init/main.c | 2 + > kernel/Makefile | 6 + > kernel/kcsan/Makefile | 14 + > kernel/kcsan/atomic.c | 21 + > kernel/kcsan/core.c | 458 ++++++++++++++++++++++ > kernel/kcsan/debugfs.c | 225 +++++++++++ > kernel/kcsan/encoding.h | 94 +++++ > kernel/kcsan/kcsan.c | 81 ++++ > kernel/kcsan/kcsan.h | 140 +++++++ > kernel/kcsan/report.c | 307 +++++++++++++++ > kernel/kcsan/test.c | 117 ++++++ > kernel/sched/Makefile | 6 + > lib/Kconfig.debug | 2 + > lib/Kconfig.kcsan | 88 +++++ > lib/Makefile | 3 + > mm/Makefile | 8 + > scripts/Makefile.kcsan | 6 + > scripts/Makefile.lib | 10 + > scripts/atomic/gen-atomic-instrumented.sh | 9 +- > tools/objtool/check.c | 17 + > 46 files changed, 2364 insertions(+), 16 deletions(-) > create mode 100644 Documentation/dev-tools/kcsan.rst > create mode 100644 include/linux/kcsan-checks.h > create mode 100644 include/linux/kcsan.h > create mode 100644 kernel/kcsan/Makefile > create mode 100644 kernel/kcsan/atomic.c > create mode 100644 kernel/kcsan/core.c > create mode 100644 kernel/kcsan/debugfs.c > create mode 100644 kernel/kcsan/encoding.h > create mode 100644 kernel/kcsan/kcsan.c > create mode 100644 kernel/kcsan/kcsan.h > create mode 100644 kernel/kcsan/report.c > create mode 100644 kernel/kcsan/test.c > create mode 100644 lib/Kconfig.kcsan > create mode 100644 scripts/Makefile.kcsan > > -- > 2.23.0.700.g56cf767bdb-goog >