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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 ED273C2BD09 for ; Wed, 3 Jul 2024 08:12:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 582EB10E747; Wed, 3 Jul 2024 08:12:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=suse.com header.i=@suse.com header.b="curRtKzm"; dkim-atps=neutral Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3877F10E747 for ; Wed, 3 Jul 2024 08:12:54 +0000 (UTC) Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2ec50a5e230so50899401fa.0 for ; Wed, 03 Jul 2024 01:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1719994372; x=1720599172; darn=lists.freedesktop.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=bdyT6ioPy1VNeKmL4j3XjcoiZwneAHmBRTL0mGefOq4=; b=curRtKzm6jmkpbB/z6hsvkIw6UOqeOvX+g59knBn+88jNnYLSrQ21unYPt63y6Eb6R X9zhwYvUyJf+n/sz/2CEPvAkTtPt0/eN30YvgozCYjNLduA6LqDfgBVBNBkjl2j4Ac0+ uuqrIwwfQYn5xwGXzv/RDQL0a9qm4VFLm8z2NJwEo1z7Z5q4BRjDfQOOv+39ke7/YWya UwW/YT1eSIfAqumRUxUMs9T3EIPhtM+/8udgskqAruk376pJxvRfU+ni2bjsK5lsslba S7YIlwXfqstaki5wYhJvNP9c8N1FHqLgOn9jj4waJq48Eqfl+bXcIKd+Sto3s75TKkX9 WHUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719994372; x=1720599172; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bdyT6ioPy1VNeKmL4j3XjcoiZwneAHmBRTL0mGefOq4=; b=DXbrleIKL64wP+4f+5Oy0a+J9Vmh+pwUmSO3DL1ojKb2wOcQFe9RO5hsZre+xpddwE YLmuhV2A9hEvDCYqHxiy0cXaOSDanVp6RjCUyfRQ8aoJgNv0LCOp5cAtqhqt2lixv1Xn iQy5D/GnhLdjhzAbilyKgswakIhlln5errUMg7BjFwJ5Awf6ae7ypKNdA+ffM7hzw0Zl Ar9wQj9A1YCAWyCxlCgKvm6UmNtsIvOmdZMsP1G6mPI7aF6lTPTKLDMbmccLqQtkispC H0yhtsOvknRf0lvKAh5UnUc6djapE8IUkWxIU4nViuxQiw3yEF64CpPLv9Y1I1gPodmS Bgig== X-Forwarded-Encrypted: i=1; AJvYcCWOY4mYtbGmxKl32ZV1fuXOPKo5pn8ELb0Q7yr4An6RKXfef3DlxrludVQng0oQHLkoRxJZi2PfgaCUp89OvcSVQ8bFP59LKWWJegX8EJhH X-Gm-Message-State: AOJu0Yx3ImYNCFMwMKQoYkUUJMEvJnmNTXGkM7nhiKdYgHuekpiFGEXC aDdRH+lOckQs/OPmp+3tKLGeK3fXBJKRgH2G+3jSJJm/TbRtWe8dPZq7zujIpnc= X-Google-Smtp-Source: AGHT+IFCrx5O8SyoDb7pv8NJaiksMiDUk0MIzdtkS+naCkfqpA17Gjg/ppieWiNLDo4J+A42AblrZQ== X-Received: by 2002:a05:651c:2010:b0:2ec:550e:24f3 with SMTP id 38308e7fff4ca-2ee5e337c3emr70900071fa.10.1719994372235; Wed, 03 Jul 2024 01:12:52 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.50]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fb0c2e10dasm15659175ad.223.2024.07.03.01.12.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 01:12:51 -0700 (PDT) Date: Wed, 3 Jul 2024 10:12:33 +0200 From: Petr Mladek To: Jocelyn Falempe Cc: Michael Ellerman , 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" , 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() Message-ID: References: <20240702122639.248110-1-jfalempe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240702122639.248110-1-jfalempe@redhat.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue 2024-07-02 14:26:04, 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 Looks good to me. With the minor fixes suggested by Kees: Acked-by: Petr Mladek Best Regards, Petr