grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Verifier running out of memory on ieee1275/powerpc64


From: Stefan Berger
Subject: Verifier running out of memory on ieee1275/powerpc64
Date: Tue, 17 Mar 2020 13:15:22 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

Hello!

 I trying to add (v)TPM support for the ieee1275/powerpc64 platform to grub. The issue I have been running into is that the verifier runs out of memory. At that point it has loaded the (~ 32MB) Linux kernel and now the verifier is invoked to load the file. Unfortunately it cannot load the file since it doesn't have enough memory to grub_malloc. I have played with increasing heap size(es) but it still doesn't work. The kernel and initramfs files on ppc64 can be rather big, thus we do not a lot of memory. The rescue initramfs here is for example 78MB, a regular initramfs from Fedora 31 is ~34MB. The kernel sizes on my system are 32MB, though a colleague was using an unstripped kernel of 127MB, so lots of (unfragmented) memory needs to be available to run verifiers.


This is the code that's trying to allocate the memory to load the file into: http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/commands/verifiers.c#n128

I had increased the GRUB_IEEE_STATIC_HEAP_LEN to 0x4000000, but it didn't resolve the issue: http://git.savannah.gnu.org/cgit/grub.git/tree/include/grub/ieee1275/ieee1275.h#n93

I also tried to increase the HEAP_MAX_SIZE to 128 * 1024 * 1024 along with HEAP_MAX_ADDR, but that didn't help, either: http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/kern/ieee1275/init.c


Does anybody have a suggestion?


   Regards,

    Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]