From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30F4913A865 for ; Wed, 3 Jul 2024 08:12:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719994376; cv=none; b=NxS3RcxogcU0PzmVjVjW6qQzPcyrPH8FzPLa4D1CykxP82k02DJV6/ohPcTm0fNc9C7E4r81Xd0gKetqx7lx79bZY+nFgDr8sF3zrzUStt+bPcPeiF+G15iIRUfhol7huM2RWQZbPut1SAx5/7oWJf//VoC6BIijhP8gwmtIzPk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719994376; c=relaxed/simple; bh=liRpZl4IWwGyImnY5WnWNXsLYqZlwepr8DqzpwnJB+Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ROtvhDIgmCdRq7hg9ba/J5A8xPDmaS6RH/QFQRUM4M5AH2vsxIZlLJV2fMW4CPkiEXwE/OIIsb4EBfD22mhkyK/lbV+jYwJky/XUe4pKBi02othZFeJvSJo/6Cl8jcAoW0OXn5H+t18vSMGPYNUkLZdfcfySDY3SyCvrVbnrpZc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=IEeKDY/z; arc=none smtp.client-ip=209.85.208.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="IEeKDY/z" Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2ec50d4e47bso48577641fa.2 for ; Wed, 03 Jul 2024 01:12:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1719994372; x=1720599172; darn=vger.kernel.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=IEeKDY/ziqWaB/ZSYmi4XUzZ4kaLM90R8qWgWGW3vxI9mSW0O3ELuKwybhAQ/5yCmR RBo0lCJctwDzWiXbnFAwtWC9RcA3be42xvF6RKhxxKo515/SxBbh5wi4OTYSVYZq8aGL P0glNdIDrojcB/6Z8SlQTTUswFof99e6qrLfIXTuW9MzbrhYiyRl6sxausqNEQK7ni8l STwz7PxuFmrhexeppujFG4qakce52SFP9YW71DUSre4ISIhwzDpmq/2SfWHqgNjx7+5z QUq0Hc/UCzodd1PANO150ohHWYCNaph4BVXGhU0rZ0aRwZQFuTwXQ0bVglKg52WeYmKN HRuQ== 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=sEy+6Qet+REACbF38/ZWxft4vi2yh8Su8o/z8DZev4EV+SVeLGMQJAr/ZjUKSFMqPl 28HPHylbgasBPTk+j6NdhoM5I/sHbpBTTakYiG91PObgDovqgRew0JY9MJ4C+Gr0/4zQ qDI1LXGNZdhbVi2umzlUCjA/3QSKHGhvFzcFN4+JvuLscZ2MHgFAlf91Q77HMim6wAxq Wetg6MO7KZL52PdHk7sNUhr9B3OFVUjvKSH1o1aZzx6rVBBUx/dJA6KytIZ1F6HHW5g0 Ylhv5tuVRSSkt+AK+LnEJIGn0PcDPBZAaUZCltvSrf1vIPox/JHhewaMkVHsL+Jbj0LL PStw== X-Forwarded-Encrypted: i=1; AJvYcCW+E+Q9VzeIILYLdplEWd8WvgkIQJT8cgOYPcWI/JeSCwqp1CxXPo8RgH8Hfm9YRi16rqJly0Y4f9bFQce7pUklly0rYvwRPU8oM8efdbOc X-Gm-Message-State: AOJu0Yyffh7vryXENYoZLDvmWvpWxXlWDrK0fITu8YYivTxvDOr89zUA 3H5IkuCy127LmH1jltzBJVgTPPNbSdRQ8sYsq9x6TiGR57Th/bFpFNyEyfihu7Y= 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> Precedence: bulk X-Mailing-List: linux-hardening@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240702122639.248110-1-jfalempe@redhat.com> 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