linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Mukesh Ojha <quic_mojha@quicinc.com>
Cc: agross@kernel.org, andersson@kernel.org,
	konrad.dybcio@linaro.org, tony.luck@intel.com,
	gpiccoli@igalia.com, catalin.marinas@arm.com, will@kernel.org,
	linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH 6/6] pstore/ram: Register context with minidump
Date: Thu, 23 Feb 2023 11:43:26 -0800	[thread overview]
Message-ID: <63f7c1de.170a0220.f48b.e137@mx.google.com> (raw)
In-Reply-To: <1676978713-7394-7-git-send-email-quic_mojha@quicinc.com>

On Tue, Feb 21, 2023 at 04:55:13PM +0530, Mukesh Ojha wrote:
> There are system which does not uses pstore directly but
> may have the interest in the context saved by pstore.
> Register pstore regions with minidump so that it get
> dumped on minidump collection.

Okay, so, this is a really interesting case -- it's a RAM backend that
is already found on a system by pstore via device tree, but there is
_another_ RAM overlay (minidump) that would like to know more about how
the pstore ram backend carves up the memory regions so it can examine
them itself too. (i.e. it's another "interface" like the pstorefs.)

So we need to provide the mapping back to the overlay. It feels to me
like the logic for this needs to live in the minidump driver itself
(rather than in the pstore RAM backend). Specifically, it wants to know
about all the operational frontends (dmesg, console, ftrace, pmsg) with
their virt & phys addresses and size.

The frontends are defined via enum pstore_type_id, and the other values
are "normal" types, so it should be possible to move this logic into
minidump instead, leaving a simpler callback. Perhaps something like:

void pstore_region_defined(enum pstore_type_id, void *virt,
			   phys_addr_t phys, size_t size);

How the pstore ram backend should know to call this, though, I'm
struggling to find a sensible way. How can it determine if the device
tree region is actually contained by a minidump overlay?

-- 
Kees Cook

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-02-23 19:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 11:25 [RFC PATCH 0/6] Add basic Minidump kernel driver support Mukesh Ojha
2023-02-21 11:25 ` [RFC PATCH 1/6] remoteproc: qcom: Expand MD_* as MINIDUMP_* Mukesh Ojha
2023-02-21 11:25 ` [RFC PATCH 2/6] remoteproc: qcom: Move minidump specific data to qcom_minidump.h Mukesh Ojha
2023-02-21 11:25 ` [RFC PATCH 3/6] soc: qcom: Add Qualcomm minidump kernel driver Mukesh Ojha
2023-03-08 20:22   ` Srinivas Kandagatla
2023-03-08 20:50     ` Konrad Dybcio
2023-03-15 15:23       ` Mukesh Ojha
2023-03-15 15:09     ` Mukesh Ojha
2023-02-21 11:25 ` [RFC PATCH 4/6] arm64: defconfig: Enable Qualcomm minidump driver Mukesh Ojha
2023-02-21 11:25 ` [RFC PATCH 5/6] remoterproc: qcom: refactor to leverage exported minidump symbol Mukesh Ojha
2023-02-21 11:25 ` [RFC PATCH 6/6] pstore/ram: Register context with minidump Mukesh Ojha
2023-02-23 19:43   ` Kees Cook [this message]
2023-02-24 10:23     ` Mukesh Ojha
2023-03-21 16:13     ` Mukesh Ojha
2023-02-23 12:37 ` [RFC PATCH 0/6] Add basic Minidump kernel driver support Brian Masney
2023-02-24 10:40   ` Mukesh Ojha
2023-02-24 17:14     ` Trilok Soni
2023-02-24 19:06     ` Brian Masney
2023-02-27 10:15       ` Mukesh Ojha
2023-03-07 17:27         ` Brian Masney
2023-03-06 15:28 ` Mukesh Ojha
2023-03-06 18:10   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63f7c1de.170a0220.f48b.e137@mx.google.com \
    --to=keescook@chromium.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=gpiccoli@igalia.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=quic_mojha@quicinc.com \
    --cc=tony.luck@intel.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).