From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00C00CDB47E for ; Fri, 13 Oct 2023 20:43:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231718AbjJMUnu (ORCPT ); Fri, 13 Oct 2023 16:43:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjJMUns (ORCPT ); Fri, 13 Oct 2023 16:43:48 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C6E783 for ; Fri, 13 Oct 2023 13:43:47 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697229825; 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; bh=mjf99a2paGdAGR0nlWpBb0LYsPYobGyOkvbTMY/UwZM=; b=YMywW7TmjqDxavYWyw8AOZBs3cMopz62odfIRtnDbqMMHgqe5SwGEhQFK7fORUctliDI2j Yk4Ei3icCjqpZjYcOgImo1TpNAgKjlVT7H7OjzoGUedNUVRCLp8tRqx51lS9t7CE1UUmsl xESJtHsXUT2cBeFgA/yfCku1AOG02cTRbdOI0HlZFHaltUOqBLmBMTAKctjMcS/UFuNgrh BdS9movtKRwMP6YZA8VzElDlXl6FpmfsEggjSdBizJ6UdIydyXJvp8tb/PFxaXkqX9lSCk ozeUfRXXPvg46WEUcuhFJCOL3KtA2e+KewUW7nxFSlLjmN6uPKtjy1hHtSrn8w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697229825; 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; bh=mjf99a2paGdAGR0nlWpBb0LYsPYobGyOkvbTMY/UwZM=; b=gEzn5Z4VmNV46vMxbBhP5FsiEarSACMcAKzr7jBeM5v5tFTXunwo+NfIu3WKIodEYlVy+o HkCHJrsbiGoGaDCg== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH printk v2 0/4] fix console flushing on panic Date: Fri, 13 Oct 2023 22:49:36 +0206 Message-Id: <20231013204340.1112036-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, While testing various panic scenarios using legacy consoles, I stumbled on a couple issues that cause the panic backtrace not to be printed: 1. In panic, an unfinalized record blocks printing of finalized records that may follow. 2. It is possible (and easy to reproduce) a scenario where the console on the panic CPU hands over to a waiter of a stopped CPU. This series addresses these 2 issues while also performing some minor cleanups to remove open coded checks about the panic context. Because of multiple refactoring done in recent history, it would be helpful to provide the LTS maintainers with the proper backported patches. I am happy to do this. John Ogness John Ogness (4): printk: For @suppress_panic_printk check other panic printk: Add this_cpu_in_panic() printk: Skip unfinalized records in panic printk: Ignore waiter on panic kernel/printk/internal.h | 1 + kernel/printk/printk.c | 64 +++++++++++++++++++------------ kernel/printk/printk_ringbuffer.c | 9 +++-- 3 files changed, 45 insertions(+), 29 deletions(-) base-commit: 29fda1ad2a64a62e1c51d61207396e2de1c67362 -- 2.39.2