Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2896762pxa; Tue, 18 Aug 2020 00:25:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZlJ0pjnxmtWSUHsvTJBGkGd5qDzHtnuaOSN7oTe8xCVthHaIudX9j9PgjqKStT8DWYw/5 X-Received: by 2002:a17:906:57c6:: with SMTP id u6mr17879672ejr.331.1597735549651; Tue, 18 Aug 2020 00:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597735549; cv=none; d=google.com; s=arc-20160816; b=q+DAcDSmw3rXN32SOFTmTfUu6ZYsoeMXECPuf08jthILA2DLFLKUPoxqzeHEWPhxIF JgBj1dbc6rDk5lhgmr7lppynaT7xihj2uid5Ri4k6Sd8z8z2w2ooPa8Xoeznlug0s/Qg 0U9g3zSbC6JiAz6aodb2Q9W5MyoS8756s3ro5Tg54SI3MzBbV6lV1F4PCdLLV8/t99YC sWoHE64haJZZIRMXucDmTzHQgr28xc0dS4o8BiP5IFsBtA/zVB+TKZVwbqfCnHIqD7y9 5FZAg/dNupujrfHLetqecNxCBKj7kS/ufYUO0iBMZXn/5ezy7put2/YsGFmIrgubrkiG l/Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:message-id :mime-version:in-reply-to:references:cc:to:subject:from:date :dkim-signature; bh=ngrPbPBRbUsq6w+flBSZQV2nOcmo/y3wzfu+I9RjOwM=; b=K+VeRyLaPUyhcx81kxKjVuifGrm0IdzhM0zGhKulaGFDQ3SrdMRpfLiEN36+uoma+w klFCaRlg2kMWGXs0FS0rP71bHkxk56OgS7MKZcLGeAXdIoE6GEO53peRfwCyWtm4MGX9 93HLkiT+BRi7hqEvwnp6akw/gXAaXnE7RCfgGC7KP6RK1uurs9wGx/8rJtZSUa1xYynz iqml3XoI/4Capu1/RZQXZST3AOWpvmkadL1ZNvNl0BzqMoWvY7yOcZADVWfBcV9AQEoh FqVootthEPzg2eN+XW06m1HSOhHnVRD8DOuXdG2deSzVBoBLcLeyu0sHhNu/MD3inCvN EJFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TSPQYiEu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o10si12795949edv.301.2020.08.18.00.25.26; Tue, 18 Aug 2020 00:25:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TSPQYiEu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726403AbgHRHWm (ORCPT + 99 others); Tue, 18 Aug 2020 03:22:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbgHRHWk (ORCPT ); Tue, 18 Aug 2020 03:22:40 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FA7AC061389; Tue, 18 Aug 2020 00:22:40 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id t11so8810246plr.5; Tue, 18 Aug 2020 00:22:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=ngrPbPBRbUsq6w+flBSZQV2nOcmo/y3wzfu+I9RjOwM=; b=TSPQYiEu1Z3JAOqWBoqY0hkMurM6qzutlorBVGTCiYHNvCTc6oGO2lvpnf9ygeWYuk /hGBax/Aor+9svcSrfngM0CKK3dbpDJc8onXTK9HHtR8G1nWkVBzOz/GzwYyI2Yydf0y 28NXnmPerG5D0pXpjDvuYp+cFFSYBQujB7GhYS9wU9QhpDn82QALLxrH4lMdBz4XlGEL ZyWsXpMC/yMp1GmvYiGoqK5+pBRrbFENkDXjDALUFLx+piH1/xZ2McUr3DB0MXJB/zJR Ev8G5+7QjObdSdOFB4uNtu0xANrJPcsSOfvdEN/I3bu5ZF5+xyaxjBcJno801fSmWgRr yxkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=ngrPbPBRbUsq6w+flBSZQV2nOcmo/y3wzfu+I9RjOwM=; b=kH4sSiZkvG3lgpfpA6m6pQZqax9CAYWEC4kXATYHvu2P8PsNCe2P5i1qGTcBvN/gGK u9cac4MVGpaMTb+jOpxgOJkYORPXYU3jgGpySiuYwMEGqQ/XuCqn7LObN8WYQmYwXt4D G4M23xlSuN/MfrOugPotPHLHFOfgfQ9aOVmf1iaE4Q9EWbJgl3BIE9IXYaPt3akKob8i rwyrNRzp0hxoel1UeGeYA8TgSliKngCBEnETO5J8meGWpnIqRNuJ3mE7pD4EcurYxsBZ eUvcVVX3XQBRsqFMbPflw6SNHqAHpxd3Y6iBeFoqthCn5r52ZDSqFAtVoHDCqTsxP/PF S52w== X-Gm-Message-State: AOAM532xwEUMjEFrE2mkSTLl6JPsJSJzI5D13ftUWCRTaGfBZX+mzWJo nGRX7ugDHnyA4TAV7/NceOE= X-Received: by 2002:a17:90a:e990:: with SMTP id v16mr16323320pjy.194.1597735359589; Tue, 18 Aug 2020 00:22:39 -0700 (PDT) Received: from localhost (193-116-193-175.tpgi.com.au. [193.116.193.175]) by smtp.gmail.com with ESMTPSA id z26sm21152854pgc.44.2020.08.18.00.22.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2020 00:22:39 -0700 (PDT) Date: Tue, 18 Aug 2020 17:22:33 +1000 From: Nicholas Piggin Subject: Re: [PATCH 1/2] lockdep: improve current->(hard|soft)irqs_enabled synchronisation with actual irq state To: peterz@infradead.org Cc: Alexey Kardashevskiy , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Ingo Molnar , Will Deacon References: <20200723105615.1268126-1-npiggin@gmail.com> <20200807111126.GI2674@hirez.programming.kicks-ass.net> <1597220073.mbvcty6ghk.astroid@bobo.none> <20200812103530.GL2674@hirez.programming.kicks-ass.net> In-Reply-To: <20200812103530.GL2674@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Message-Id: <1597735273.s0usqkrlsk.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Excerpts from peterz@infradead.org's message of August 12, 2020 8:35 pm: > On Wed, Aug 12, 2020 at 06:18:28PM +1000, Nicholas Piggin wrote: >> Excerpts from peterz@infradead.org's message of August 7, 2020 9:11 pm: >> >=20 >> > What's wrong with something like this? >> >=20 >> > AFAICT there's no reason to actually try and add IRQ tracing here, it'= s >> > just a hand full of instructions at the most. >>=20 >> Because we may want to use that in other places as well, so it would >> be nice to have tracing. >>=20 >> Hmm... also, I thought NMI context was free to call local_irq_save/resto= re >> anyway so the bug would still be there in those cases? >=20 > NMI code has in_nmi() true, in which case the IRQ tracing is disabled > (except for x86 which has CONFIG_TRACE_IRQFLAGS_NMI). >=20 That doesn't help. It doesn't fix the lockdep irq state going out of synch with the actual irq state. The code which triggered this with the special powerpc irq disable has in_nmi() true as well. Thanks, Nick