Hello Ard, On Fri, Jan 10, 2025 at 08:32:08AM +0100, Ard Biesheuvel wrote: > On Thu, 9 Jan 2025 at 17:32, Usama Arif <usamaarif642@xxxxxxxxx> wrote: > > I think in the end whoevers' responsibility it is, the easiest path forward > > seems to be in kernel? (and not firmware or libstub) > > > > Agreed. But as I pointed out in the other thread, the memory > attributes table only augments the memory map with permission > information, and can be disregarded, and given how badly we mangle the > memory map on x86, maybe this is the right choice here. If this augmented memory is not preserved accross kexec, then the next kexec'ed kernel will be able to find the original table? I understand that the memattr region(s) need to be always (in each kexec instances) `memblocked_reserved` to protect it from being used as a System RAM, right? Thus, if it is not passed throught e820, kexec'ed kernel needs to fetch it again from original EFI table at kexec/boot time. This brings me another question. If the kexec'ed kernel sees the original memory, why can't it augment/update the RX permissions *again*, instead of passing the previous augmented version from previous kernel in this crazy dance. > This is a kexec problem (on x86 only) so let's fix it there. Would you mind explaining what kexec needs to be done differently? Should it preserve the augmented memattr table independently if it is mapped in e820? Thank you! --breno