Re: [PATCH v2 00/10] LUO: PCI subsystem (phase I)

Pratyush Yadav
2025-10-14T16:11:18Z

On Mon, Oct 13 2025, Pratyush Yadav wrote:

> On Fri, Oct 10 2025, Jason Miu wrote:
[...]
>> For the folio sanity check with KEXEC_HANDOVER_DEBUG, I can follow
>> that up. Would you tell me what we like to check before reboot, I may
>> have missed some context. Thanks!
>
> The idea is to sanity-check the preserved folios in the kexec-reboot
> flow somewhere. The main check discussed was to make sure the folios are
> of the same order as they were preserved with. This will help catch bugs
> where folios might split after being preserved.
>
> Maybe we can add some more checks too? Like making sure the folios
> aren't freed after they were preserved. But that condition is a bit
> trickier to catch. But at least the former should be simple enough to
> do as a start.

Also perhaps check in kho_preserve_folio() that the preserved folio is
not in scratch memory? This can be a non-debug check as well I suppose,
though looping through all scratch areas every time might end up being
too slow.

--
Regards,
Pratyush Yadav