From b40fc78cfd4e669257c6e11f12c22c8141b70617 Mon Sep 17 00:00:00 2001 From: Xue Liu Date: Tue, 28 May 2024 16:22:41 +0800 Subject: [PATCH] Fix that Patch1008 introduced old code --- ...patch-ddd74b7a50-introduced-old-code.patch | 25 +++++++++++++++++++ grub.patches | 1 + grub2.spec | 5 +++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 1010-Fix-that-patch-ddd74b7a50-introduced-old-code.patch diff --git a/1010-Fix-that-patch-ddd74b7a50-introduced-old-code.patch b/1010-Fix-that-patch-ddd74b7a50-introduced-old-code.patch new file mode 100644 index 0000000..d26ff67 --- /dev/null +++ b/1010-Fix-that-patch-ddd74b7a50-introduced-old-code.patch @@ -0,0 +1,25 @@ +From b76474f5e5ab9c936fa80aa1019865d556d1dc70 Mon Sep 17 00:00:00 2001 +From: Xue Liu +Date: Tue, 28 May 2024 16:17:50 +0800 +Subject: [PATCH] Fix that patch ddd74b7a50 introduced old code + +--- + grub-core/kern/efi/mm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c +index 6f8810e..4281feb 100644 +--- a/grub-core/kern/efi/mm.c ++++ b/grub-core/kern/efi/mm.c +@@ -469,7 +469,7 @@ filter_memory_map (grub_efi_memory_descriptor_t *memory_map, + #ifdef GRUB_CPU_LOONGARCH64 + && desc->physical_start <= grub_efi_max_usable_address() + #else +- && desc->physical_start <= GRUB_EFI_MAX_USABLE_ADDRESS ++ && desc->physical_start <= GRUB_EFI_MAX_ALLOCATION_ADDRESS + #endif + && desc->physical_start + PAGES_TO_BYTES (desc->num_pages) > 0x100000 + && desc->num_pages != 0) +-- +2.41.0 + diff --git a/grub.patches b/grub.patches index 3b94a74..9b0f34e 100644 --- a/grub.patches +++ b/grub.patches @@ -207,3 +207,4 @@ Patch1006: 1006-CVE-2024-1048-grub-set-bootflag-More-complete-fix.patch Patch1007: 1007-CVE-2024-1048-grub-set-bootflag-Exit-calmly-when-not.patch Patch1008: 1008-loongarch-add-back-compatibility-for-linux-kernel.patch Patch1009: 1009-configure-Add-GRUB_CPU_LOONGARCH64-support.patch +Patch1010: 1010-Fix-that-patch-ddd74b7a50-introduced-old-code.patch diff --git a/grub2.spec b/grub2.spec index 6b2cfaa..bb98626 100644 --- a/grub2.spec +++ b/grub2.spec @@ -1,4 +1,4 @@ -%define anolis_release 7 +%define anolis_release 8 %global _lto_cflags %{nil} %undefine _hardened_build @@ -506,6 +506,9 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg %endif %changelog +* Tue May 28 2024 Xue Liu - 2.12-8 +- Fix that Patch1008 introduced old code + * Fri May 24 2024 Juxin Gao - 2.12-7 - Add GRUB_CPU_LOONGARCH64 for loongson platform -- Gitee