Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp509629ybg; Fri, 18 Oct 2019 03:16:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhZ/lyYORuea0kqOf3deUsNOVN5lSBGSpu75VQObkxRak/pnOteT0xpwyWvlU/cq/apEjS X-Received: by 2002:a05:6402:3051:: with SMTP id bu17mr8665409edb.4.1571393782745; Fri, 18 Oct 2019 03:16:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571393782; cv=none; d=google.com; s=arc-20160816; b=x0sW6HQ+ypODPRwijQz8WwS0KGD2xfUeb8+s4nUJ7+GOU8vKXAtOtEyERPGpWo2sY7 AkQf+FiNguXhAimHm8dkiAzUkuU03pslouBH15j1eO0q+8mnLkkOcmVtj3KONJ1czu04 xootwycACpJe8pTemr2+KEtkSbRf8Sc0edeggZ7hO/sGq6zUmtMD9EzD1I2G07ULnmOi LGbDfSey6VBx1FwwnsTr0UxRuatiPfotx6Pbh332T9NM1EigzLBld+G9Br5/1+SWOtj/ MpNHm90XmeN/zB8t7j1nC4zd1l7O5MTzVxWAxJ1oX/qAq7uYNCzFidINEdrO3e7XVxJG iJLg== 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=cUHCv9N4xmS+l1KgWpk7F+i9WTYTBzhVIUBy6Hulrwk=; b=AXeHITyW6/I9rY3c3A12r+B+xGWm9m41ExClnnjRsUSIOQpfDIePeRXbcyLC8ZieSu pfpixL0UPyAvyYQigv4BX51RJ/39xheMpjsaHWo9iOeHr3cD3rVYeBwWmsXmKdHx5uGR WNav5xV5pRglzM219mYA1ur5DbKKpLBcdmeNoVm1g6tYQriuCa2Eowz14whorJW3a4vu /CdfAV8q8kVWYvYwwMX0e5PO4O26QEpR6vntW1414kH4tu/atEHTkBDXk9uwXitda6iu LkfU8McQOJP+BSHfybJa7c7rUAAzJQRp2eHZwvIF4nrJnFn25B4MPY3nVj3PtQkyD31X WmxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dt61Iqtl; 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 w55si3720084eda.15.2019.10.18.03.15.59; Fri, 18 Oct 2019 03:16:22 -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=dt61Iqtl; 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 S1728395AbfJQHtl (ORCPT + 99 others); Thu, 17 Oct 2019 03:49:41 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:40362 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726372AbfJQHtk (ORCPT ); Thu, 17 Oct 2019 03:49:40 -0400 Received: by mail-oi1-f196.google.com with SMTP id k9so1336597oib.7 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=oFv9EcbO4DkHd/mgyRgndp3y0xXV4j4C+zKPy7+SPv9NhzpiJOTCEXaHvvGuK+Hcxt wDT9nkOI5GvslX2f5AwHMm7xFa+z1AMJ22eyh+6lb162twPj36tVWYBJj0zlQASnCRUU fa+bvfYtgshcQTRBbRmA6a4j2DZ3pt8XPVITe2PJaKXXDyhfQ2/L2byWFsWvr0WX0yFV E2XA8AWOqKDC9/l3AwwmuMiTWzTgRxT1Wn/5+TftaJ1imsLlpfqUhaCPRI7raINr9DWS LzUqBFhNHsyCapfPbd3ZXSwBzzhFDln9cBnGSOYvDQgtipJ1ucdjCQNvrXjbStFivxKu eZcw== X-Gm-Message-State: APjAAAXCkBRSQ4VCfymOHRU+w1uQiPyJt4s9JfNjiWGPRwsPmjZiTM1y 67btZom2+iuKJYK8ytmGnwMJ0adKsLCE4WcNRpl3zg== 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.