Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1208951rdg; Fri, 13 Oct 2023 13:44:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHaxhRzdjvsd3R2tYzq6JxTMFGahZUjtBDkve6/tE8BQz5PDgTah/nzsojCSWnyg7MuyBwB X-Received: by 2002:a17:902:dac2:b0:1c7:49dd:2ff with SMTP id q2-20020a170902dac200b001c749dd02ffmr1697726plx.27.1697229842246; Fri, 13 Oct 2023 13:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697229842; cv=none; d=google.com; s=arc-20160816; b=GsfKYtQpHv4dNA4gckMjeAqYIXu/o/1akbwtKcQDT2xhM/dRPXvc4qdRFlxFIR5qLD bcD/7Qp6YEvJzikcanGYe5Ceft0cZ1ScHlRmKibijJqKeLTzmI+HHt2urcxUkrQ5UBAa O2uJPbJfNyXhG1yWLPDUz4ABHnlXXNka9OAVoJ5KNf+9EIgr22NF9vuozcc1mw2YEGXt xa8bUXwxHnRyp6rdEe6Ufs2Azk8h2BsSmu5lfAzbibzYA87KFkWU3p016Xn5BExdh7QT eIb+XHw6/9JiBo4L27oBVnSrut+gmN4Er39gYLjyPO8CUGeWBaTgSyEXfL/E4gba6L5a Ct9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:dkim-signature:dkim-signature:from; bh=mjf99a2paGdAGR0nlWpBb0LYsPYobGyOkvbTMY/UwZM=; fh=pKnPKUsir0uEGSsor+4Zc2vgbu+g+ayvUgsdzkuXaoA=; b=M751TgwAk5LYAu4QEc7lt2XcUs/myAvI4f/HM6cw6ktWbzxX9IN7lXsoBEKDZkh1w+ OwGHX8cqFeoB9EkIn4y58lPUdayaWblognWgDUdvi7vyluGeXDABccQe1mvPJc04qkTu s9H6DZ6Ap+bKvrE6kaKYpaEpqOLFUiE38NbUYwMZZjwt7WbCETVxtLdTJYDtimh4An+u Pbt1FXgLZ4SyS7yH3aRHndc0Aus493rsGDZHveEqTRJ4JuhgAMwPOUgWLfl6vdxlNfGx njCt172bfnbh9B0a56PEsevUJA1KNIskvFW6hyjb6ud1ujUFc7PSNkDm90OsTDHmBIAK nbjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=YMywW7Tm; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id l19-20020a170902eb1300b001c61817e049si4963338plb.67.2023.10.13.13.44.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 13:44:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=YMywW7Tm; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A30AE801C953; Fri, 13 Oct 2023 13:43:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231468AbjJMUnt (ORCPT + 99 others); Fri, 13 Oct 2023 16:43:49 -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 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INVALID_DATE_TZ_ABSURD, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 13 Oct 2023 13:43:59 -0700 (PDT) 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