Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp345589pxa; Wed, 12 Aug 2020 03:40:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnseAKSu0uJKX0j8qu4dlPn8IIRp0wsYmFQIY5eWobu/SfLhmfo+l1O4UawNy/TfumJYe0 X-Received: by 2002:a17:906:fcdb:: with SMTP id qx27mr30118759ejb.421.1597228818715; Wed, 12 Aug 2020 03:40:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597228818; cv=none; d=google.com; s=arc-20160816; b=auZyFyeawzeJyanf5RkJoU1KjSomq74VeOhuh25brVVOV/d8vqi8ZHyl5t5m5gkX6J V6iQ7jRO5/dhXprOW8bVdgWNsQ8YoNuFMxU5PllmGVCkNhvudXDj8BOC3YZW7Ncc1c5K 225lEFPqF7D+diRu6hJJw34m7Vbo+Lv4cLbOBbSp/Y3gubCafSWuqkA+DfzYBVQvQbNw 1T/vQyfXNCYKZZfATMu53Ml8JSoWSWEHe/ds9hViaaopyDuKEi1XpFN9UwOz2ZPduBMB Ax2wIh2tmP/szS3OWSjxLDStIJaRcbKPeMQ+SvMDop4tddyOdOcYHM7wKBlWmE7J2/ga IXRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=a6/dAk8hzb0WYY+kQF71Fgx1O3nwOedWBapk4f0aaOE=; b=vu6GMXAmEl+RbW7feqsnlm0Wpv5zxHlcbxk1RMTcz7NnAhbBElnv4q717yQK8Z738r OQYt8laQYo4P9f1h2DEW9dAAH8Y6phEe6XAUASdMV9FtR7GaFWZ/Ttec6brvqwlHj6ID 9K0d4BnMtsbGsh2GOvljT9LA/4tLQqPjUHZQTaD0Nkbs1OW8g3zpGkFsnLIQhxRcuBxV d06ZWK5/kGAUH+tBbNDmJiaTBSsLoQY7/LJwQENUVtb2v1iMXPwis1HBZlld192gGvlm bxyPp81Ad7aWw8m07uUMCWR2bSGkzRwP7k/v1cvTYDrgffHUi/wrjFp1g4kwDDCyMMlq 5TnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=KA3A4rKf; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ju9si884742ejb.266.2020.08.12.03.39.54; Wed, 12 Aug 2020 03:40:18 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=KA3A4rKf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726829AbgHLKhR (ORCPT + 99 others); Wed, 12 Aug 2020 06:37:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726404AbgHLKhR (ORCPT ); Wed, 12 Aug 2020 06:37:17 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDFDCC06174A; Wed, 12 Aug 2020 03:37:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=a6/dAk8hzb0WYY+kQF71Fgx1O3nwOedWBapk4f0aaOE=; b=KA3A4rKfqtBkAolbpGhZQn0gae rIqsIfEejxM64L+YMTBJUSvg9fEFIfvHxwctOuhc9kOyfSdozptYsA0jAOiKaRSfUdNi72MKP9/pK nkS/znp2LKbSteLjA3WozUbWSHli0WpEytH2VWZvz/eAOBqRX+XYtpWzwnEOCloZYCLFOC3afCNHm rkq0HuJB3Rc7Zw8PRD3F29LxE2f6cEgqiZbZbThXq4+UEfKq9D08M/+swMXJRha+LvkLztxW2QGL2 ViWxhZVhOuYLHsAyeFHBmHL/uIcJ0MWeVdzlotQr4696vPqatWO8tc8k9EQnzrdgHJJkzsiPQxZg3 zd6QAwzg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1k5o6c-0008Cw-Cp; Wed, 12 Aug 2020 10:36:12 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 911FF300DAE; Wed, 12 Aug 2020 12:35:30 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 787BB2B412CB6; Wed, 12 Aug 2020 12:35:30 +0200 (CEST) Date: Wed, 12 Aug 2020 12:35:30 +0200 From: peterz@infradead.org To: Nicholas Piggin Cc: Alexey Kardashevskiy , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Ingo Molnar , Will Deacon Subject: Re: [PATCH 1/2] lockdep: improve current->(hard|soft)irqs_enabled synchronisation with actual irq state Message-ID: <20200812103530.GL2674@hirez.programming.kicks-ass.net> References: <20200723105615.1268126-1-npiggin@gmail.com> <20200807111126.GI2674@hirez.programming.kicks-ass.net> <1597220073.mbvcty6ghk.astroid@bobo.none> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1597220073.mbvcty6ghk.astroid@bobo.none> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: > > > > What's wrong with something like this? > > > > AFAICT there's no reason to actually try and add IRQ tracing here, it's > > just a hand full of instructions at the most. > > Because we may want to use that in other places as well, so it would > be nice to have tracing. > > Hmm... also, I thought NMI context was free to call local_irq_save/restore > anyway so the bug would still be there in those cases? NMI code has in_nmi() true, in which case the IRQ tracing is disabled (except for x86 which has CONFIG_TRACE_IRQFLAGS_NMI).