From a40686130d1ba509c89dc19c0e5e1c8e517760a0 Mon Sep 17 00:00:00 2001 From: Xue Liu Date: Tue, 28 May 2024 16:22:41 +0800 Subject: [PATCH 1/2] Fix that patch ddd74b7a50 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..40f4192 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 patch ddd74b7a50 introduced old code + * Fri May 24 2024 Juxin Gao - 2.12-7 - Add GRUB_CPU_LOONGARCH64 for loongson platform -- Gitee From f87541eccffb8ba83c0a313a580498948a8bf0f7 Mon Sep 17 00:00:00 2001 From: Sevever <12333754+sevever@user.noreply.gitee.com> Date: Tue, 28 May 2024 09:13:31 +0000 Subject: [PATCH 2/2] Revert "Fix that patch ddd74b7a50 introduced old code" This reverts commit a40686130d1ba509c89dc19c0e5e1c8e517760a0. --- ...patch-ddd74b7a50-introduced-old-code.patch | 25 ------------------- grub.patches | 1 - grub2.spec | 5 +--- 3 files changed, 1 insertion(+), 30 deletions(-) delete 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 deleted file mode 100644 index d26ff67..0000000 --- a/1010-Fix-that-patch-ddd74b7a50-introduced-old-code.patch +++ /dev/null @@ -1,25 +0,0 @@ -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 9b0f34e..3b94a74 100644 --- a/grub.patches +++ b/grub.patches @@ -207,4 +207,3 @@ 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 40f4192..6b2cfaa 100644 --- a/grub2.spec +++ b/grub2.spec @@ -1,4 +1,4 @@ -%define anolis_release 8 +%define anolis_release 7 %global _lto_cflags %{nil} %undefine _hardened_build @@ -506,9 +506,6 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg %endif %changelog -* Tue May 28 2024 Xue Liu - 2.12-8 -- Fix that patch ddd74b7a50 introduced old code - * Fri May 24 2024 Juxin Gao - 2.12-7 - Add GRUB_CPU_LOONGARCH64 for loongson platform -- Gitee