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=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no 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 42E6AC4CECE for ; Thu, 17 Oct 2019 07:49:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 028562082C for ; Thu, 17 Oct 2019 07:49:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="dt61Iqtl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 028562082C 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 A71DF8E0005; Thu, 17 Oct 2019 03:49:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A22EA8E0001; Thu, 17 Oct 2019 03:49:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 938FE8E0005; Thu, 17 Oct 2019 03:49:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0155.hostedemail.com [216.40.44.155]) by kanga.kvack.org (Postfix) with ESMTP id 723EB8E0001 for ; Thu, 17 Oct 2019 03:49:41 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 147564DB5 for ; Thu, 17 Oct 2019 07:49:41 +0000 (UTC) X-FDA: 76052502162.29.hen26_547e54d87ab41 X-HE-Tag: hen26_547e54d87ab41 X-Filterd-Recvd-Size: 5507 Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Thu, 17 Oct 2019 07:49:40 +0000 (UTC) Received: by mail-oi1-f194.google.com with SMTP id i185so1328677oif.9 for ; Thu, 17 Oct 2019 00:49:40 -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=cUHCv9N4xmS+l1KgWpk7F+i9WTYTBzhVIUBy6Hulrwk=; b=dt61IqtloaZiwqdtmjmdhi8e3I0pzOWxPhzFhs+0FutgvUJ++FJOjdWO4BjIZxdya4 caOrhbydK56exS2QuA7Fd/bGjBtmOLqdRwkisDlBpmKuprQVBzPi+VbRWrE1Qg6x33eB L75C7W/XAakRnGcEUuRBZ2z0un1gUplzXJroKi8gc4pISSeGK+cslFlF67xNbSnSkcrH LFchrXP3xHyls9CwuwZQyeVw5GAWJqlGniCs+QihxmqhsqJFUxxUdUPgx8sH/6i8mrEB sJzIy+1BqIQwiJztBJmzppL/ZLh/4Dco+FslmOq/Cu10P2FffFtoC2Vy5Qpl06EYeyt4 9GPQ== 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=cUHCv9N4xmS+l1KgWpk7F+i9WTYTBzhVIUBy6Hulrwk=; b=tJGy3TiWkv31cZVViK9UBqsd0w3JuYAR9U2S7t8GMWyXYinD6F9wgHaZV1FmBItwhO cwV2ZwUFKckioj9zOnRMo9/Jjb8QODv49Mvn2aOeKr4KFnd1E9NjdsNNl/5JaZuFfx+T BQXnBKz/lzX8bActWz+e4r/43XkNNfXi1/pXvwBT5oGeiUc+pFib9s3e0XsjDez3kuF/ BrDQ5mJPniHfYr6OyLo1QHIS67Bcd8sM5udt4xkbBByGvvcGLCFyTsOO1ewClYRmgg1G AvTkxlAm8rueC+x7NqeHOZhWQSoJuSYe+N3brV7TQs1+wvh0Wg3Z/xApSwo/k8YffVer azSA== X-Gm-Message-State: APjAAAWiF2Qt39XPShFmvXI2FdpLkPHvGX2pRB5d0x+X5rH1GukkNnha SUVgkNkcNi19kLxmGUPIDtAyArtUukx5415evR83vQ== X-Google-Smtp-Source: APXvYqw1eEq8EzjwYbx0MRbK18Xsa8AnqD+7ouVLKZUwR1kvjQzxQA3cqofqYXLP73Ei/x91O0n2XeJ8s6UCZGf1FOg= X-Received: by 2002:aca:55cb:: with SMTP id j194mr1913152oib.155.1571298579393; Thu, 17 Oct 2019 00:49:39 -0700 (PDT) MIME-Version: 1.0 References: <20191016083959.186860-1-elver@google.com> <20191016083959.186860-2-elver@google.com> <20191016184346.GT2328@hirez.programming.kicks-ass.net> <20191017074730.GW2328@hirez.programming.kicks-ass.net> In-Reply-To: <20191017074730.GW2328@hirez.programming.kicks-ass.net> From: Marco Elver Date: Thu, 17 Oct 2019 09:49:27 +0200 Message-ID: Subject: Re: [PATCH 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure To: Peter Zijlstra 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" , 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 Thu, 17 Oct 2019 at 09:47, Peter Zijlstra wrote: > > On Wed, Oct 16, 2019 at 09:34:05PM +0200, Marco Elver wrote: > > On Wed, 16 Oct 2019 at 20:44, Peter Zijlstra wrote: > > > > + /* > > > > + * Disable interrupts & preemptions, to ignore races due to accesses in > > > > + * threads running on the same CPU. > > > > + */ > > > > + local_irq_save(irq_flags); > > > > + preempt_disable(); > > > > > > Is there a point to that preempt_disable() here? > > > > We want to avoid being preempted while the watchpoint is set up; > > otherwise, we would report data-races for CPU-local data, which is > > incorrect. > > Disabling IRQs already very much disables preemption. There is > absolutely no point in doing preempt_disable() when the whole section > already runs with IRQs disabled. Ah thanks for the clarification, in that case I assume it's safe to remove preempt_disable() for v2. > -- > You received this message because you are subscribed to the Google Groups "kasan-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/20191017074730.GW2328%40hirez.programming.kicks-ass.net.