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

From: Mukesh Ojha
Date: Thu Jul 06 2023 - 12:02:02 EST




On 7/6/2023 3:51 AM, Kees Cook wrote:
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.

Yes, in-short, it wants RAM backend (fs/pstore/ram.c) to use regular ram
instead of fixed ram address range and at the same time it should be
able to query the address used.

So, registering with minidump is what telling upfront what address range
content would we be getting in final crash dump.

-Mukesh


-Kees