From nobody Fri Feb 13 15:06:31 2026 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 EE03B13AA2D for ; Mon, 27 May 2024 06:38:28 +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=1716791910; cv=none; b=rSjK8dwn/1if+oyYZ057HHa3Il+28gOq5509ABnNAJBgPQVR0XOaLAz2dPm+Z6azHLMkxf/HkEQVjM48rFEz9qf5Q4UpGEZCx8nuPT1rBYV6DQzRh+qXBnOHk8XStuSFUeBPxzLw0WleOmFUEtm/1uj4oba6PcKxndZGA5KkCW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716791910; c=relaxed/simple; bh=ApV3BrzIy3FzvWp+ns3WoghCqTJI0MOJzDStPgz0cJY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=px8XYre+nIXyap7zpBfy2adVlEXlIQfT3bJDCTinxI/ZEWzON0ECAPRSKd4uNaKbAOq1VgA9DM3hxWWk9qLkIjAFhrpC2wlPqafVph+KAbKGsWf7QQvsfxA7Mx0lpgnN440FxalLEx0xE20N0+OBgk6dSeuaLuay8CUCIuXT4dg= 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=xKwVz7Ri; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=TorGkXxy; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xKwVz7Ri"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="TorGkXxy" From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1716791907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ypq720fklC/HaR4UTxfPN0fK1+MPpff79Yq5uFGIqB0=; b=xKwVz7RiSbkQ6LlCzh2pdMGlVTnTHcm80TDxjCbg98R66FcxTCVE276nR9ikUB3MgWLi+w dT2csWpy4EYXIbqxSZcPUqMqbiI6Lqr13wXPJ9OcuuANggqPvo2Y6CFK76j9mm/9WYxeHM r0CME2p0PREryWHTPXTcWis6lPEUd8HKOZs+5K1EJ4I8qjijhAdsN4u6uoWwnIU/2Z0M6w SlHMCl9E0AfmaDeqmCkYdwxMX8ktmV3DqlGAG0jp3b/zyLOvqW9JvCSCBZj/QGtTIFjDni GqZHtLyUcuIJqhpay/2cv8L7eTEK/WH5COJ9sFKZgJM9QzvV7B28mNOhLeGVIA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1716791907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ypq720fklC/HaR4UTxfPN0fK1+MPpff79Yq5uFGIqB0=; b=TorGkXxyqExrWA7fo16ISDGIhpNuo1sMGn4Cc0BBLveKqmAuU3HBCaF6DxM3YmyjGqd127 a46Oi2RTTYvIFPAA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Andrew Morton , Ingo Molnar , Arnd Bergmann , Uros Bizjak , Kefeng Wang Subject: [PATCH printk v6 28/30] panic: Mark emergency section in oops Date: Mon, 27 May 2024 08:43:47 +0206 Message-Id: <20240527063749.391035-29-john.ogness@linutronix.de> In-Reply-To: <20240527063749.391035-1-john.ogness@linutronix.de> References: <20240527063749.391035-1-john.ogness@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Mark an emergency section beginning with oops_enter() until the end of oops_exit(). In this section, the CPU will not perform console output for the printk() calls. Instead, a flushing of the console output is triggered when exiting the emergency section. The very end of oops_exit() performs a kmsg_dump(). This is not included in the emergency section because it is another flushing mechanism that should occur after the consoles have been triggered to flush. Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- kernel/panic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/panic.c b/kernel/panic.c index ee03193f9495..3754a2471b4f 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -634,6 +634,7 @@ bool oops_may_print(void) */ void oops_enter(void) { + nbcon_cpu_emergency_enter(); tracing_off(); /* can't trust the integrity of the kernel anymore: */ debug_locks_off(); @@ -656,6 +657,7 @@ void oops_exit(void) { do_oops_enter_exit(); print_oops_end_marker(); + nbcon_cpu_emergency_exit(); kmsg_dump(KMSG_DUMP_OOPS); } =20 --=20 2.39.2