From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.54 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796114698; b=ofBTC6m/ioAqOV5osqt5S8q2KD9cGwoI1DWXMUuDyAhZq2/XWfGWMMb2cVdmkq0RKc0o 9XJGGdg7giXwBPy5Aibr316EVQoUJk2TuZOb6AxNJ24Ta/iBVP5vUTSDjt0KY7NOKDNCo ZpwZLfh3V9uJsuYix1LTpi8SQdezYRy3DOkeA7bvipSSqVKcNxucA74uIaROoVrT17jeR GndcdCSjRtoXwgN+PQ/FW+VfKYamTlVwMfKCAo9FuZvsN/RWlknK/Q3I1who7erTnwvLB RCNATNHZwQZmVd08HFBkfdxrZOEotVKY30dUvuXFExcg9XT1StdcsuENYmSF8IqYvPg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796114698; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=hB+cXJzaIuQqVpsfo9+SH2Er6Qi931fa+h8Gh+LC9ug=; b=W2MuKOPJ1MDVcsIAGhfRih4/kwlhivaPYm2PMJFsLx6MEMU7A05hBtAbfiL3PmKTdmwt dAksun6JRmyuiAmtfVQWcmBejDJume32LjLn5IglN8ajqOFNcw21gfeeEpPk9SOXiI1AE UONEr+VdFsg10QY7+IVkWWDPccUuoOIkozvlIWBtyx91a2fhPhY5ylpdu5ONCUsU0Eg6S 3iTRP+e7X92uvXR1WDTvfBs47hHMNc8vrGg2oZcpIBI6EEkDBtBZ3N/DLPjMpJivIOOcd aBc1FmdnN2tGsVzymyLkKS3yYWdXnc/tdX9B1/c7sTRLvCPkwHnungtGSLklcllKC7g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=PSrGnUBM; arc=none smtp.remote-ip=209.85.128.54 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4460606A327 for ; Tue, 1 Dec 2026 08:44:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E4460606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=PSrGnUBM Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4bbcb9bccf6so8314565e9.1 for ; Tue, 01 Dec 2026 00:44:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1796114696; x=1796719496; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=hB+cXJzaIuQqVpsfo9+SH2Er6Qi931fa+h8Gh+LC9ug=; b=PSrGnUBM99fk13tw6Txm1AFFEt57Fw11edce54/JiOGq8fjqFR1rEeKdKLsS+15P0F bDtQy3IV2XKBqc0IXCCcnDTenybT/gaPNn2yhDsqfhsq/HlGxkMln/uNjf54DL5Dn7nV V3F4eNw/y8poa15W/2I6YAnSyCID51KkEjzXW+WNqEr70ZGFQIL6R+IYEHDVob2YXAGf 5q020X/xygKq3QV284KBTZhCaWMvlPx3cCQNEqgt8B7iOCyCe4+ux3ZAoLOypARuuFvE RiIBt7Oc5kQ8I0fU6orTJJK68H2Vrp3pcWOx0ub64N3/ibMjL2mXta6voomysZS0fNVm wEuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796114696; x=1796719496; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=hB+cXJzaIuQqVpsfo9+SH2Er6Qi931fa+h8Gh+LC9ug=; b=jIDC+oPpKpyillITq5q8Pv3boMWQvN6Sd9AAx/7J2MiVCUrSEGNnpDCGUHRVCaox9E CdTtJ+mStDPGQnzti8yhvuglH2Li8v+E4dFJkWD3MAktAvlFHBD8e5wdjU1Wfz8cV1pr pUWJDnAyVxUJkEA0WJLZF4lDBezF/EZLYlabPLkXcnYyEDqef+syEJXrdwtUwgbRhB0k QETjlwIM5U5GyyyaRUVN2K6cfps41v+V0Ns8fdnKJcgUOZW/eFFZLvurd6/MKDKA907F wVIv3RDkWtUJCLVknFsvOU62QX28aXCQ9akS6xUvZ3p1dg3jPfoPzfV1ykYZkqXdslx6 N0ug== X-Forwarded-Encrypted: i=1; AL+hErHYDASgMq/dt1Xzeph7CNl7IM5kUitu7cpPMR+6dPH0JO2eFLj5RcnkGbsBJrBnW7TcJpO1TGB2hZ0sEHc=@vger.kernel.org X-Gm-Message-State: APuU4Z8D6S4mH4HFQJ4yhPl/3O3fVOu/qsioOhIhspNJrO0CwnF1vCIN OmNC+aK+hzEKZNfkyLG6e0l6h/YFqGYeRo5p1y0t6B8PFYRZ8/51D9xOp53zSJWFYWbWzcVrtYk 7JciTL1s= X-Gm-Gg: AZFdTZchsiRUA247w3BNFios+5KcRZ0KstbklOd5hbUVg8TFw1gRRBUwBI+gFdzS36T jjEXn+hN+wmfrDpf/un0B0Z7NEs4YjuNCCliYLGPNCNBJQr6IltqYBiKsQ4yForNVh6HkW2aNtq Hs8iU8+nsvb2OY6ExlBWi5EYQngjVIdmBB7YuD55rM9T2W1PZ8tuOYVJxZcEMXZt1cwJM/t+aeI jFaIJ31FVSXDuOJw3kGxi02duDX1Pq3XNNtkW3j6gAHSdt9/sscF3riXdP8wxZaKK6uqVxTbVjA CEKTlniOtBgYV093+NBWKKMgW5tIUlTn+ioWgniVyyljDALeqYPZExBXhtRH2TUB4irlFQ8y9em zJNPyDcToKVP2BUDUR8rpKiFA2VWiqpojv3uJ1N/xwn2hGoqMEANBKC6vmG7LdSCdseYrvaFsSD XTwB2LGa1kxEXSgj9NZAMdI22RAedwrsdRIbJX8keny9BQBXCSzL0EiqumW+sBurxbUz78Fxd6s 0ZpGU+JhORo73cBgh5oWg3aq6XWMmH6c2wZaemb3SJy8pPN/dINuuQ3nt3mMvO3JpnP416lxcsP eMIVRquu3sdOCX9H89XBEM9icTZ4Nw== X-Received: by 2002:a05:600c:e553:b0:4bb:9457:3c93 with SMTP id 5b1f17b1804b1-4bb94573c9amr502866085e9.2.1796114696331; Tue, 01 Dec 2026 00:44:56 -0800 (PST) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb853c9170sm1050202275e9.14.2026.12.01.00.44.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 00:44:55 -0800 (PST) Date: Tue, 1 Dec 2026 09:44:53 +0100 From: Petr Mladek To: Breno Leitao Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , Waiman Long , John Ogness , Marco Elver , Dmitry Vyukov , linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, kernel-team@meta.com Subject: Re: [PATCH v3] lockdep: Move the emergency section out of print_irqtrace_events() Message-ID: References: <20261109-kcsan-irqtrace-emergency-v3-1-6d62e3406b8d@debian.org> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261109-kcsan-irqtrace-emergency-v3-1-6d62e3406b8d@debian.org> On Mon 2026-11-09 05:44:30, Breno Leitao wrote: > Commit 59cd94ef8009 ("lockdep: Mark emergency sections in lockdep > splats") made print_irqtrace_events() enter an nbcon emergency section > by itself. That was meant for lockdep splats, but the function is also > used outside lockdep (by verbose KCSAN reports, the soft and hard > lockup detectors, etc). > > For KCSAN, as print_report() runs with the raw report_lock held and > interrupts disabled, so every verbose report writes out the whole > console backlog under report_lock. Other CPUs that detect a race in the > meantime spin on report_lock with interrupts disabled, as the lock is > taken before rate_limit_report() gets a chance to drop the report. > > That causes this type of problems (as seen in Meta's fleet): > > BUG: KCSAN: data-race in mlx5e_poll_tx_cq+0x5d8/0x998 > ... > irq event stamp: 28975074 > smp: csd: Detected non-responsive CSD lock (#2) on CPU#35, waiting 5000000052 ns for CPU#26 ipi_mb+0x0/0x18(0x0). > smp: csd: Detected non-responsive CSD lock (#3) on CPU#65, waiting 5000000020 ns for CPU#00 do_nothing+0x0/0x18(0x0). > watchdog: CPU71: Watchdog detected hard LOCKUP on cpu 0 > Kernel panic - not syncing: Hard LOCKUP > > Drop the emergency section from print_irqtrace_events() and enter it > around the call in check_flags(), the only lockdep splat that prints > the irqtrace events outside of one. The other splats and __warn() > already wrap their whole output in an emergency section. > > Fixes: 59cd94ef8009 ("lockdep: Mark emergency sections in lockdep splats") > Suggested-by: John Ogness > Signed-off-by: Breno Leitao JFYI, the patch has been committed into printk/linux.git, branch for-7.5-trivial. Best Regards, Petr