forked from pool/grub2
Accepting request 1040499 from home:michael-chang:branches:Base:System
- Add tpm to signed grub.elf image (PED-1990) (bsc#1205912) - Increase initial heap size from 1/4 to 1/3 * 0001-ieee1275-Increase-initially-allocated-heap-from-1-4-.patch OBS-URL: https://build.opensuse.org/request/show/1040499 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=429
This commit is contained in:
parent
46c0e0c8b7
commit
b8a9f2473e
@ -0,0 +1,49 @@
|
||||
From 41965e194599af42e77bcf2462bd9c0db2823b16 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Berger <stefanb@linux.ibm.com>
|
||||
Date: Tue, 1 Nov 2022 11:06:03 -0400
|
||||
Subject: [PATCH] ieee1275: Increase initially allocated heap from 1/4 to 1/3
|
||||
|
||||
The patch 'ieee1275: claim more memory' (commit 910676645d) states:
|
||||
|
||||
"[...] This leaves us 381MB. 1/4 of 381MB is ~95MB. That should be enough
|
||||
to verify a 30MB vmlinux and should eave plenty of space to load Linux
|
||||
and the initrd."
|
||||
|
||||
As it turns out the memory limit of ~95MB is insufficient for the FADUMP
|
||||
use case as described here:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2139000#c1
|
||||
|
||||
Adjust the current memory limitation by increasing the allocation to
|
||||
1/3 of 381 MB, so ~127MB.
|
||||
|
||||
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
|
||||
---
|
||||
grub-core/kern/ieee1275/init.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
|
||||
index 0bacc2348..f75a36493 100644
|
||||
--- a/grub-core/kern/ieee1275/init.c
|
||||
+++ b/grub-core/kern/ieee1275/init.c
|
||||
@@ -47,7 +47,7 @@
|
||||
#include <grub/lockdown.h>
|
||||
|
||||
/* The maximum heap size we're going to claim. Not used by sparc.
|
||||
- We allocate 1/4 of the available memory under 4G, up to this limit. */
|
||||
+ We allocate 1/3 of the available memory under 4G, up to this limit. */
|
||||
#ifdef __i386__
|
||||
#define HEAP_MAX_SIZE (unsigned long) (64 * 1024 * 1024)
|
||||
#else // __powerpc__
|
||||
@@ -415,7 +415,7 @@ grub_claim_heap (void)
|
||||
|
||||
grub_machine_mmap_iterate (heap_size, &total);
|
||||
|
||||
- total = total / 4;
|
||||
+ total = total / 3;
|
||||
if (total > HEAP_MAX_SIZE)
|
||||
total = HEAP_MAX_SIZE;
|
||||
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 5 08:47:06 UTC 2022 - Michael Chang <mchang@suse.com>
|
||||
|
||||
- Add tpm to signed grub.elf image (PED-1990) (bsc#1205912)
|
||||
- Increase initial heap size from 1/4 to 1/3
|
||||
* 0001-ieee1275-Increase-initially-allocated-heap-from-1-4-.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 22 08:11:17 UTC 2022 - Michael Chang <mchang@suse.com>
|
||||
|
||||
|
@ -478,6 +478,7 @@ Patch948: 0011-font-Assign-null_font-to-glyphs-in-ascii_font_glyph.patch
|
||||
Patch949: 0012-normal-charset-Fix-an-integer-overflow-in-grub_unico.patch
|
||||
Patch950: 0001-fs-btrfs-Use-full-btrfs-bootloader-area.patch
|
||||
Patch951: 0002-Mark-environmet-blocks-as-used-for-image-embedding.patch
|
||||
Patch952: 0001-ieee1275-Increase-initially-allocated-heap-from-1-4-.patch
|
||||
|
||||
Requires: gettext-runtime
|
||||
%if 0%{?suse_version} >= 1140
|
||||
@ -763,7 +764,7 @@ CD_MODULES="${CD_MODULES} linux"
|
||||
|
||||
GRUB_MODULES="${CD_MODULES} ${FS_MODULES} ${PXE_MODULES} ${CRYPTO_MODULES} mdraid09 mdraid1x lvm serial"
|
||||
%ifarch ppc ppc64 ppc64le
|
||||
GRUB_MODULES="${GRUB_MODULES} appendedsig memdisk tar regexp prep_loadenv"
|
||||
GRUB_MODULES="${GRUB_MODULES} appendedsig memdisk tar regexp prep_loadenv tpm"
|
||||
%endif
|
||||
|
||||
%ifarch %{efi}
|
||||
|
Loading…
Reference in New Issue
Block a user