Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp983252rdb; Fri, 16 Feb 2024 01:23:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV+NGLiompD77LEIDdl8kWw0OKRdWGebeBsotHrfuxD9/AwWqffdXUqs9q5iKzcR3t2BL2lqpZZhngzmwTLu5D37p4UgE/jfhHwvcRWVg== X-Google-Smtp-Source: AGHT+IHOWUq6LJSV4xWw3z9e/U8f3wn6zavcikXbVzjLNiNOlUM/NQYm7/CelgazoQrF8TDz6GnI X-Received: by 2002:a05:6a21:31c8:b0:19e:b963:cad6 with SMTP id zb8-20020a056a2131c800b0019eb963cad6mr4571698pzb.53.1708075394863; Fri, 16 Feb 2024 01:23:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708075394; cv=pass; d=google.com; s=arc-20160816; b=yJpN3xbgCQFt4MMuB0UHpH6CuIGjS64cUFM5dSCOlX62dWEOVum0HCrwKtCVUCIJyG Szbm1VheLdvTFC7aDuzl1weXEBqCiGYT+rk/GNEOif61DsxCENU0xaSldP42FI5RPY+V wiEe1rSz4xHtxvvhA9LtK+TZMIX8ijNDv6/efceHgetfkyiMaq6KcgDJ0w2qTu8pvBS/ rkgwb/SUPJP8hP+9D3nvRqpLrZiT46FM3Ig+jq5cnbJg7wAmmA8BPW5/+HCdivabGiHg sTK6B42xS2BePhZAr9WB3BWc2ZWzd9xP834MzB2HEqlpOP5gDdsk6cstpR7yh8lbkFq9 6Utg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=svr/tG93+IhRjX3JlqAVKVH56EQboOnBEuSSo7Dfcac=; fh=dkVmH1jx3VuJRPzcL1ECBXdtvdbYFKYDnil8fSyPTqY=; b=Ch6N79DEEPPVTfgdg0+FCylsBmnYU8FLXmI94e1HmsbOCJ0R0Cuy2KKyELdfx36OhF 46PX9l5flMDZIBIfaHaayvYIL6c+XEYZQ3hXLgDrrdwaPNPt9dZLhiNX7qQF2/0qIwZN //eAY46p/LfvfsDCXgybqNarK4C0TfCFOVGXamCPSLHRqLKYDjUHJZFF6Vli6fkxNc1R BhXzXraIPHIMGwNSTTNikoaQ+81LU/Aqwyuir61zSojRHq8wHj4puPFAbTuClfIzSN1v JfubOpLqzZERk06ttXRVE6XS2SIQo2VYDXWioO1bjRguZVmuHYSekLayDiv8NoVt3k0O R/cg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qFpPyopj; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=vqSY7Xwh; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-68326-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68326-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bx20-20020a056a00429400b006e1250d347esi2454525pfb.348.2024.02.16.01.23.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 01:23:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68326-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qFpPyopj; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=vqSY7Xwh; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-68326-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68326-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 909C02850BA for ; Fri, 16 Feb 2024 09:23:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E22791B968; Fri, 16 Feb 2024 09:23:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qFpPyopj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="vqSY7Xwh" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B360F1B95D for ; Fri, 16 Feb 2024 09:23:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708075388; cv=none; b=ra+NuklocwXWT1Fn/d9ASKrLNscIYUganAdzfyqacBMLQHKotDHjwzlgDVh4MSRQ4x5PlI5MS5ftCR90/sS/3hyQ+0tfbIK0NNQWdZx4Aob5O8E91sfRCOr8ocNL7eZuaYsilPuvpDYu+XaZ/SuVVZ/D+P1mvh4G6fk+U43tExE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708075388; c=relaxed/simple; bh=svr/tG93+IhRjX3JlqAVKVH56EQboOnBEuSSo7Dfcac=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=pV2xLHOK+YNulNncCbZirYyesbE05XzKzsTB2uI4u1H4fthc1WVcQ8JaN7N8XlB1Aw7QUy1/WqqCUsZjYVNnWdGSxDCTwUsqNu1Mo8XejyWTg6Vd/ySYHnvWaWjy93t9jMB/zMXHECU+Yjcw4XsYKBFT8g430Zk4B7Rs0RaMQ48= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=qFpPyopj; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=vqSY7Xwh; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708075384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=svr/tG93+IhRjX3JlqAVKVH56EQboOnBEuSSo7Dfcac=; b=qFpPyopjiaOKr9Bf6XrK720PVB0dMLOvho+du5tVdDUZ1qft8YwkL2JwBORKgnoIyWW3o2 Rvlb2Sp0E0ZOGGNC+mixsuXB+778n4WSo6fBbM1gVrY/0g+igWlzArLL9aI8Yc+Im8WOec M5eLGOCTrAghca1mLE+6KufInx1CIMKCdZgYY68Jwm5lxEwl3lcPVAl8E+BO+8lRG1TgYW 2Daj/cao8YTgxXvemqeNIA3xvPmQgJdl22C3VzBz+SdlYGsZO6+i+/IL80Ce+Hv5uqUjGN LAjl2OXjO6vwqN0hjk/wujaSPIrMrjTX4rzT+cw4jCLGlS7KZwyfxtH5Vxoi7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708075384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=svr/tG93+IhRjX3JlqAVKVH56EQboOnBEuSSo7Dfcac=; b=vqSY7XwhX8Xmi7zOWwE/1fj3g2KxcOJjLlJBPIBw+ZsZmUWyVuLvRwLYPf9CAexm7fQzTK Zn6X36wlEpDSw5BQ== To: Stephen Brennan , linux-kernel@vger.kernel.org Cc: Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Stephen Brennan Subject: Re: [PATCH] printk: save loglevel before console_verbose() In-Reply-To: <20240216005128.1045812-1-stephen.s.brennan@oracle.com> References: <20240216005128.1045812-1-stephen.s.brennan@oracle.com> Date: Fri, 16 Feb 2024 10:28:46 +0106 Message-ID: <87eddcsqzd.fsf@jogness.linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On 2024-02-15, Stephen Brennan wrote: > In panic() cases, console_verbose() is called, clobbering the > console_loglevel value. If the bug which led to the panic related to > printk, it can be useful to know the log level prior to the > console_verbose() call. I've done a *lot* of printk debugging over the past 6 years and have never had a case where this would be useful (or even interesting). I assume there is some rare and particular scenario you are trying to debug. And once you've debugged it, it is no longer useful for you either. IMHO this does not warrant adding an extra global variable for all Linux users. When Petr gets back from vacation, maybe he will have a different opinion. John Ogness