From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 130E94315F for ; Fri, 26 Jun 2026 09:42:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782466933; cv=none; b=LnAnWu/HCEbKGZwcZDVP7GIABFHcDCHJbDX/472wQLk+SA8veTiObIkOixubkd3hjAapCe3uL9A7BiwT1gfOSGyDvT5hv/gt6XYlwx3Vz2BT7NBZQBDdQMoKMJMvx8EGy49JFk5AUA/cEcO3UFJXEUV+ihduFnA2wd7Nv2PDBW8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782466933; c=relaxed/simple; bh=xChD5ko7xj9WKHYq63ZmwYEcWbmEkWAXhQ5x+ZVZ8Y4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ef+sSQd+7DC9ZgSQeBRbBT3pec6aMIYlnR7z9r9bnVoEen1ZpGjnGlneq3905AvsYseysG7cGOu01E37MMTIPTrtpWe6MBu/076/A46KdKQJMJMtABCAOmxcXq4lIJUfdexKoB7NLscegExyJQi9nTJOcVUW95/WxXmO94dbMIs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Ga2ay2ev; arc=none smtp.client-ip=209.85.221.50 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.b="Ga2ay2ev" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-462342ac290so739069f8f.2 for ; Fri, 26 Jun 2026 02:42:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1782466930; x=1783071730; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=i57MYdMXpilBWj0slexli9uFmzGeK180L7PM67C9CYU=; b=Ga2ay2evjcb46l2x/sQbH1EfMH4VBvZigfqGdL9AAaJcWkpBETNryoP8sYi0+suSnu ddTvC/P5ZoCjuLewhlOWiWS8SyRlhzMC68JqVm6LpBw18REftY03G4AGr48vSpJN+F+p mXJUtjUKD9vZxdBiBylMmoKtE64gIG2Xvrc8nA4KfgjiTCAq4jIzYXAmgSkN46ImmQaR iuTsBShNuETBUP5M3KmKZIFHcJd/F8pdS4uQAeFLLd4EmBp7iH2xG7YIq5eMX7Cx3jhd ZmgxG4cdhHA2QRbpfS89HfBbom2tZPreQGG8cdkg4t9ulNjBS+NCCg9tzjlS0nJ+7NAl 3oMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782466930; x=1783071730; h=in-reply-to:content-disposition: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; bh=i57MYdMXpilBWj0slexli9uFmzGeK180L7PM67C9CYU=; b=ZQn2d4r3oCO97w4zyI2xVPaxa6mb2dHOA05rAI5rWaebn6Axz+l1JcbDN/KG+VKN49 fibGe3sC+Hsx9WRDsSZvGi9cZto0wI1lwqmU6k0f5m0KbxilIg38VMs5IrRhz90tW0m8 FAS0XmdJLHgJOr7Tgrh6qwVDcsoIoowP3eyJqTtPYnZo9k6p0zEFnjwsN3tPkhzRelEU czaVG7WgKnP5jBmxEuWjFtPmp9cqGv2uEFs3ThZuzOtvEk0TmtWU9hPS3l8bWGidFUbs iU3s7VWAHuVFyduZV6g30fHwP/aKKD4AKH9z1orU0qPPd3oWlmNpHSsy0OjTn3FqyScB TjNQ== X-Forwarded-Encrypted: i=1; AHgh+RrtiwEp61YxRmBrGD/GaWmJxIVjnBSEjvweO6cj+a0egZGCPDmnZ0gl+7+TBCni9EeC7jdrJIfgcz9m5lI=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+cwOYRJ1A8Ka5YNRPrBkVly6sjHyGfch6VrTgl8pdMZuY6mzf foRejfc176J+h3ojbXtQXh6Sb00asgbEtQDxtgpuLalbYS/l+PzBfx16mqz8/D1l4BQ= X-Gm-Gg: AfdE7clqDcskCTPVxP+VXOIRjKF95ZKY4y34+R2PSLd4ktjgtMCOQk8aI28DxKSZbdi oN1XeoxM0xtiYVRJEIib8RQJJkGaaf560GZdor2ticVb9YgAt6PeKzOoyYYsHPd1nSUOO/ba7I2 3WnO6+l6k/c/xu463ncRKljXuERkGbARIiGU6VX0gPW8BJdDV63Ov8UKCgyvpa30uWMNg841DbY 2BhhAjJjo+JfSJrO2YFrdVt0FHPF49BJ6AhaXtlJlrl235DhlQk/p4QYtGZgbIEg9fVGnfk8beJ CYIg1OPL5fNvjgdEyxUaKA3hGF136pa3bVkeUstv+PEmpKwTSp6oL3jKe86PmtL022XyHWKBV1P kXA/0qtJ/nf9A0/2iWB2PShnCphbPaXjH474Kthg2ASXT/8Iz7FU4WhNrX8EzGl9oYqkLC8uJyr tkctOev4vUbYVOYvE= X-Received: by 2002:a05:6000:461d:b0:446:db72:e8ec with SMTP id ffacd0b85a97d-46dc1a9181amr10448749f8f.23.1782466930592; Fri, 26 Jun 2026 02:42:10 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-46c2279b734sm24794053f8f.30.2026.06.26.02.42.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2026 02:42:10 -0700 (PDT) Date: Fri, 26 Jun 2026 11:42:07 +0200 From: Petr Mladek To: Bradley Morgan Cc: Andrew Morton , Feng Tang , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Madhavan Srinivasan , Douglas Anderson , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, stable@vger.kernel.org Subject: Re: [PATCH v3 3/4] powerpc/watchdog: use sys_info_with_filter() to avoid duplicate backtraces Message-ID: References: <20260625152558.7450-1-include@grrlz.net> <20260625152558.7450-4-include@grrlz.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260625152558.7450-4-include@grrlz.net> On Thu 2026-06-25 15:25:57, Bradley Morgan wrote: > The powerpc watchdog prints all CPU backtraces itself. When the watchdog > mask contains only SYS_INFO_ALL_BT, stripping that bit leaves zero and > sys_info(0) falls back to kernel_sys_info. > > Use sys_info_with_filter() so an explicit all_bt mask does not request > the global default. > > --- a/arch/powerpc/kernel/watchdog.c > +++ b/arch/powerpc/kernel/watchdog.c > @@ -418,11 +421,12 @@ DEFINE_INTERRUPT_HANDLER_NMI(soft_nmi_interrupt) > > xchg(&__wd_nmi_output, 1); // see wd_lockup_ipi > > + si_mask = READ_ONCE(hardlockup_si_mask); > if (sysctl_hardlockup_all_cpu_backtrace || > - (hardlockup_si_mask & SYS_INFO_ALL_BT)) > + (si_mask & SYS_INFO_ALL_BT)) > trigger_allbutcpu_cpu_backtrace(cpu); > > - sys_info(hardlockup_si_mask & ~SYS_INFO_ALL_BT); > + sys_info_with_filter(si_mask, SYS_INFO_ALL_BT); > if (hardlockup_panic) > nmi_panic(regs, "Hard LOCKUP"); I thought more about it and it is even more complicated. Even if we prevent the duplicated output with sys_info_with_filter() here. Then nmi_panic() might still trigger it once again. We could say that this patch is a step in the right direction and fix the other problem later. But I am not sure. We might need a completely different approach and this is just a step aside. And there is another problem in the panic() code. I am going to comment in it in the 4th patch. Best Regards, Petr