Re: [PATCH v3 5/6] Add memtool module with memory allocation stress-test

2023-02-06 Thread Stefan Berger
On 2/1/23 17:14, Glenn Washburn wrote: On Mon, 30 Jan 2023 14:16:20 -0500 Stefan Berger wrote: + +#ifdef MM_DEBUG Since you added the line "condition = COND_MM_DEBUG;" to grub-core/Makefile.core.def above. Are these "#ifdef MM_DEBUG" lines in this file needed? And if they still are needed

[PATCH v4 1/6] ieee1275: request memory with ibm, client-architecture-support

2023-02-06 Thread Stefan Berger
From: Daniel Axtens On PowerVM, the first time we boot a Linux partition, we may only get 256MB of real memory area, even if the partition has more memory. This isn't enough to reliably verify a kernel. Fortunately, the Power Architecture Platform Reference (PAPR) defines a method we can call to

[PATCH v4 5/6] Add memtool module with memory allocation stress-test

2023-02-06 Thread Stefan Berger
From: Daniel Axtens When working on memory, it's nice to be able to test your work. Add a memtest module. When compiled with --enable-mm-debug, it exposes 3 commands: * lsmem - print all allocations and free space in all regions * lsfreemem - print free space in all regions * stress_big_all

[PATCH v4 6/6] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2023-02-06 Thread Stefan Berger
Add support for trusted boot using a vTPM 2.0 on the IBM IEEE1275 PowerPC platform. With this patch grub now measures text and binary data into the TPM's PCRs 8 and 9 in the same way as the x86_64 platform does. This patch requires Daniel Axtens's patches for claiming more memory. Note: The tpm_i

[PATCH v4 4/6] ieee1275: implement vec5 for cas negotiation

2023-02-06 Thread Stefan Berger
From: Diego Domingos As a legacy support, if the vector 5 is not implemented, Power Hypervisor will consider the max CPUs as 64 instead 256 currently supported during client-architecture-support negotiation. This patch implements the vector 5 and set the MAX CPUs to 256 while setting the others

[PATCH v4 3/6] ieee1275: support runtime memory claiming

2023-02-06 Thread Stefan Berger
From: Daniel Axtens On powerpc-ieee1275, we are running out of memory trying to verify anything. This is because: - we have to load an entire file into memory to verify it. This is difficult to change with appended signatures. - We only have 32MB of heap. - Distro kernels are now often aro

[PATCH v4 0/6] Dynamic allocation of memory regions and IBM vTPM 2.0

2023-02-06 Thread Stefan Berger
Hello, This is an addition to the series sent from Daniel Axtens (https://lists.gnu.org/archive/html/grub-devel/2022-04/msg00064.html). Patch 'ieee1275: request memory with ibm,client-architecture-support' implements vectors 1-4 of client-architecture-support negotiation However, during some te

[PATCH v4 2/6] ieee1275: drop len -= 1 quirk in heap_init

2023-02-06 Thread Stefan Berger
From: Daniel Axtens This was apparently 'required by some firmware': commit dc9468500919 ("2007-02-12 Hollis Blanchard "). It's not clear what firmware that was, and what platform from 14 years ago which exhibited the bug then is still both in use and buggy now. It doesn't cause issues on qem

Re: [PATCH] tests: Add pathological iso9660 filesystem tests

2023-02-06 Thread Glenn Washburn
On Sun, 05 Feb 2023 09:24:21 +0100 "Thomas Schmitt" wrote: > Hi, > > Glenn Washburn wrote: > > --- a/tests/iso9660_test.in > > +++ b/tests/iso9660_test.in > > @@ -12,4 +12,13 @@ fi > > "@builddir@/grub-fs-tester" rockridge_joliet > > "@builddir@/grub-fs-tester" joliet_1999 > > "@builddir@/gru

Re: [PATCH v4 3/6] ieee1275: support runtime memory claiming

2023-02-06 Thread Robbie Harwood
Stefan Berger writes: > -/* The maximum heap size we're going to claim */ > +/* The maximum heap size we're going to claim at boot. Not used by sparc. */ > #ifdef __i386__ > #define HEAP_MAX_SIZE(unsigned long) (64 * 1024 * 1024) > -#else > +#else /* __powerpc__ */ > #define HE

Re: [PATCH v4 6/6] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2023-02-06 Thread Robbie Harwood
Stefan Berger writes: > Add support for trusted boot using a vTPM 2.0 on the IBM IEEE1275 > PowerPC platform. With this patch grub now measures text and binary data > into the TPM's PCRs 8 and 9 in the same way as the x86_64 platform > does. > > This patch requires Daniel Axtens's patches for cla

Re: [PATCH v4 3/6] ieee1275: support runtime memory claiming

2023-02-06 Thread Stefan Berger
On 2/6/23 15:09, Robbie Harwood wrote: Stefan Berger writes: -/* The maximum heap size we're going to claim */ +/* The maximum heap size we're going to claim at boot. Not used by sparc. */ #ifdef __i386__ #define HEAP_MAX_SIZE (unsigned long) (64 * 1024 * 1024) -#else +#else /* _