From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (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 6714516D9BE; Fri, 12 Jul 2024 12:26:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720787202; cv=none; b=MQZMdciSgkObMP6hl0kH94cBAXKZec0OxRlqAl0JXOw+nYtdGRFyn4xZvTs8YA1d/IZ926AsriWg+vBE801ia3atG6By07XTw+fGcIyoYjx6CvxqR8tWENCQC0RPw8EBbFvYuES6V0N4L0Ib8dEzRvTPFyXdpt7kHZmgrDGW0qk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720787202; c=relaxed/simple; bh=W/JAWJhqwLQ1P0orQJWW1/8E04mwqXBgymBjcLudDdY=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=AlyOCyjYeSEb4FEXjF2j2DvrwrPG9B54HFwHkggeFI8LGJlcZyW6PI8VL9q8g6bBMUshDdhXFj6YAFLXJQpiqEs2yrWAdJRNNaiwMDVhgHGYhNxTEsVGDrVc/KKCC9jhtHt7mijWSNgW+qzXznTsLka+gzy9FaNcLm/HJbH/Q/M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au; spf=pass smtp.mailfrom=ellerman.id.au; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b=Co2V4BjM; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="Co2V4BjM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1720787198; bh=y3aYzv3E08GfB0EpusXKM20MT9AQOoPQDNzGPOMTVdI=; h=From:To:Subject:In-Reply-To:References:Date:From; b=Co2V4BjMcX/7vgmwzvkEZr1aw14sUnlShzS9Kl4XYLI/CPlBJuzENWiJr0LaAUuQb 5Rq1q2rDPvbSJ1YAYgU08a4HZ3wXvPI3IjgetuU3olC8OnhS2LlTyoaPk9ym+pE58S UObABJKdLCh2UwQqXCMD+iD/FUJIdJ9VVV9eLni4lXsif1Ole5T+oVEIc2MzvXRAkR dZVfKo9PbCLDzZyRn2eaAZDq0nN9zt672hBIQcLnonXlMWFIBnGrEZ/ksdeICD5xpX 0vAu+ZIF8Ja30ubpJC+fE+b72H6qZ+2BavN1T8n0hkN11amwpuxhp0uuabUwALmEPr LWDATLrj4zR2w== 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 4WL9nV3m8Hz4x1y; Fri, 12 Jul 2024 22:26:38 +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 , Jocelyn Falempe , 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: <20240702122639.248110-1-jfalempe@redhat.com> References: <20240702122639.248110-1-jfalempe@redhat.com> Date: Fri, 12 Jul 2024 22:26:38 +1000 Message-ID: <87y1664wzl.fsf@mail.lhotse> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Jocelyn Falempe writes: > 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 ++-- Acked-by: Michael Ellerman (powerpc) cheers