Re: [PATCH] pstore/ram: Add support for dynamically allocated ramoops memory regions

From: Kees Cook
Date: Wed Jul 05 2023 - 18:21:12 EST


On Tue, Jul 04, 2023 at 08:07:09AM +0200, Krzysztof Kozlowski wrote:
> On 26/06/2023 19:34, Mukesh Ojha wrote:
> > I have tried multiple attempt already to get this patch in
> >
> > https://lore.kernel.org/lkml/1675330081-15029-2-git-send-email-quic_mojha@xxxxxxxxxxx/
> >
> > later tried the approach of patch #9 along with minidump series..
>
> For all dynamic reserved-memory-ramoops thingy, I think Rob made clear
> statement:
>
> "I don't think dynamic ramoops location should be defined in DT."
>
> https://lore.kernel.org/lkml/CAL_JsqKV6EEpsDNdj1BTN6nODb=hsHkzsdkCzzWwnTrygn0K-A@xxxxxxxxxxxxxx/
>
> Please do not send three versions of the same patch hoping one will
> sneak in.

If I understand correctly, the driving issue here is that minidump wants
to be able to find the crash report "externally". Perhaps pstore could
provide either a known symbol that contains the address that was used,
or could add something to the kernel crash image (like is done for
KASLR), so that an external consumer of the kernel crash image could
find it?

And then the RAM backend for pstore could gain an option for "just
allocate regular RAM" for holding the dump? In other words, the address
is chosen by pstore, but an external consumer could still locate it.

-Kees

--
Kees Cook