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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C8F7C3DA4A for ; Fri, 12 Jul 2024 12:27:05 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=ng02PIPv; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4WL9p018Rtz3cZB for ; Fri, 12 Jul 2024 22:27:04 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=ng02PIPv; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4WL9n970Dsz30Wb for ; Fri, 12 Jul 2024 22:26:21 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1720787179; bh=61Rg5T54YsytFfb5o275tB/ve8FKKkyJzddzOl72DrU=; h=From:To:Subject:In-Reply-To:References:Date:From; b=ng02PIPvIHYkBYM9ZsmmArGNeKdmCARzvmV1GdYuE8JF5wHcuHAkUZRXXoUKWrREK Sqdzpm78nub+p5+hVw+Fs54MEuC8BjISMwUSy0bEpSKSJRTnm/vw8Kp6tyQttl2WfA r+vsHVW8rBMDW45AVQZCh+Do75llGY+c23Qcm6WtDJhVZRXzhAmVP4prhw4y9Ci0Lb xYZ123Yp4K91FgHgv33mWxDZYdgVgZ8KWA5mOwG2/1e6nPxk2j30WY3naVG5OfK9UM GgSqYHt980kdYyHus4Y9WAIrMsWLuIRruL/JTOpWKWWoXHx9wq/X9KFRIjXeDDYul7 wGpfHK9662J/Q== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4WL9n21XgMz4x1y; Fri, 12 Jul 2024 22:26:14 +1000 (AEST) From: Michael Ellerman To: Jocelyn Falempe , Nicholas Piggin , Christophe Leroy , "Naveen N. Rao" , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky , Andrew Morton , Jani Nikula , Greg Kroah-Hartman , Kefeng Wang , Thomas Gleixner , Uros Bizjak , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-hyperv@vger.kernel.org, linux-mtd@lists.infradead.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2] printk: Add a short description string to kmsg_dump() In-Reply-To: <2d886ba5-950b-4dff-81ea-8748d7d67c55@redhat.com> References: <20240702122639.248110-1-jfalempe@redhat.com> <2d886ba5-950b-4dff-81ea-8748d7d67c55@redhat.com> Date: Fri, 12 Jul 2024 22:26:12 +1000 Message-ID: <871q3y6bkr.fsf@mail.lhotse> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Jocelyn Falempe writes: > On 02/07/2024 14:26, Jocelyn Falempe wrote: >> kmsg_dump doesn't forward the panic reason string to the kmsg_dumper >> callback. >> This patch adds a new struct kmsg_dump_detail, that will hold the >> reason and description, and pass it to the dump() callback. >> >> To avoid updating all kmsg_dump() call, it adds a kmsg_dump_desc() >> function and a macro for backward compatibility. >> >> I've written this for drm_panic, but it can be useful for other >> kmsg_dumper. >> It allows to see the panic reason, like "sysrq triggered crash" >> or "VFS: Unable to mount root fs on xxxx" on the drm panic screen. >> >> v2: >> * Use a struct kmsg_dump_detail to hold the reason and description >> pointer, for more flexibility if we want to add other parameters. >> (Kees Cook) >> * Fix powerpc/nvram_64 build, as I didn't update the forward >> declaration of oops_to_nvram() >> >> Signed-off-by: Jocelyn Falempe >> --- >> arch/powerpc/kernel/nvram_64.c | 8 ++++---- >> arch/powerpc/platforms/powernv/opal-kmsg.c | 4 ++-- >> arch/um/kernel/kmsg_dump.c | 2 +- >> drivers/gpu/drm/drm_panic.c | 4 ++-- >> drivers/hv/hv_common.c | 4 ++-- >> drivers/mtd/mtdoops.c | 2 +- >> fs/pstore/platform.c | 10 +++++----- >> include/linux/kmsg_dump.h | 22 +++++++++++++++++++--- >> kernel/panic.c | 2 +- >> kernel/printk/printk.c | 11 ++++++++--- >> 10 files changed, 45 insertions(+), 24 deletions(-) > ... > Gentle ping, I need reviews from powerpc, usermod linux, mtd, pstore and > hyperv, to be able to push it in the drm-misc tree. For a simple mechanical change like that you don't need reviews from every subsystem. As long as it's posted to each subsystem and there's been a bit of time for folks to see it, and the build robots to build it, that should be sufficient. Otherwise you could be waiting forever. cheers