Re: [PATCH] of_reserved_mem: Save region name string into struct reserved_mem
From: Krzysztof Kozlowski
Date: Sun Aug 25 2024 - 03:18:57 EST
On Wed, Aug 21, 2024 at 02:51:02PM +0100, Jiaxun Yang wrote:
> Previously only a pointer to fdt string pool is saved to struct
> reserved_mem as region name.
>
> As on some architectures booting FDT will be wiped at later initialisation
> stages, this is breaking reserved_mem users.
>
> Copy and save the whole string into struct reserved_mem to avoid
> FDT lifecycle problem.
>
> Reported-by: Kevin Wheatfox <enkerewpo@xxxxxxxxxxx>
> Closes: https://lore.kernel.org/loongarch/ME4P282MB1397447C3C094554C7AF2E37B58E2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
I doubt this uses mainline tree...
> Signed-off-by: Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>
This is a bigger problem and should be solved unified way in multiple
places. You cannot just wipe out FDT from the memory, because it is used
in all other places.
Your report earlier probably used some custom patches allowing this
wipe out, but that's the mistake. Fix your wiping out mechanism...
Best regards,
Krzysztof