All of lore.kernel.org
 help / color / mirror / Atom feed
* Verifier running out of memory on ieee1275/powerpc64
@ 2020-03-17 17:15 Stefan Berger
  2020-03-18 15:59 ` Simon Hardy
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Berger @ 2020-03-17 17:15 UTC (permalink / raw)
  To: grub-devel

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-03-20 17:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-17 17:15 Verifier running out of memory on ieee1275/powerpc64 Stefan Berger
2020-03-18 15:59 ` Simon Hardy
2020-03-18 19:32   ` Stefan Berger
2020-03-18 20:27     ` Stefan Berger
2020-03-18 22:17       ` Simon Hardy
2020-03-19 16:37         ` Stefan Berger
2020-03-20 17:14           ` Eric Snowberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.