diff --git a/0283-fs-xfs-Fix-large-extent-counters-incompat-feature-su.patch b/0283-fs-xfs-Fix-large-extent-counters-incompat-feature-su.patch new file mode 100644 index 0000000..ba64163 --- /dev/null +++ b/0283-fs-xfs-Fix-large-extent-counters-incompat-feature-su.patch @@ -0,0 +1,44 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Wed, 4 Dec 2024 07:50:28 -0600 +Subject: [PATCH] fs/xfs: fix large extent counters incompat feature support + +When large extent counter / NREXT64 support was added to grub, it missed +a couple of direct reads of nextents which need to be changed to the new +NREXT64-aware helper as well. Without this, we'll have mis-reads of some +directories with this feature enabled. + +(The large extent counter fix likely raced on merge with +07318ee7e ("fs/xfs: Fix XFS directory extent parsing") which added the new +direct nextents reads just prior, causing this issue.) + +Fixes: aa7c1322671e ("fs/xfs: Add large extent counters incompat feature support") +Signed-off-by: Eric Sandeen +Reviewed-by: Anthony Iliopoulos +Reviewed-by: Jon DeVree +--- + grub-core/fs/xfs.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c +index 8e02ab4a3014..92046f9bdf49 100644 +--- a/grub-core/fs/xfs.c ++++ b/grub-core/fs/xfs.c +@@ -926,7 +926,7 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir, + * Leaf and tail information are only in the data block if the number + * of extents is 1. + */ +- if (dir->inode.nextents == grub_cpu_to_be32_compile_time (1)) ++ if (grub_xfs_get_inode_nextents(&dir->inode) == 1) + { + struct grub_xfs_dirblock_tail *tail = grub_xfs_dir_tail (dir->data, dirblock); + +@@ -980,7 +980,7 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir, + * The expected number of directory entries is only tracked for the + * single extent case. + */ +- if (dir->inode.nextents == grub_cpu_to_be32_compile_time (1)) ++ if (grub_xfs_get_inode_nextents(&dir->inode) == 1) + { + /* Check if last direntry in this block is reached. */ + entries--; diff --git a/grub.patches b/grub.patches index 2bfbdf9..0f67361 100644 --- a/grub.patches +++ b/grub.patches @@ -279,4 +279,5 @@ Patch0278: 0278-linuxefi-Invalidate-i-cache-before-starting-the-kern.patch Patch0279: 0279-grub-mkconfig-dont-overwrite-BLS-cmdline-if-BLSCFG.patch Patch0280: 0280-grub2-mkconfig-Pass-all-boot-params-when-used-by-ana.patch Patch0281: 0281-10_linux.in-escape-semicolon-and-ampersand-on-BLS-up.patch -Patch0282: 0282-acpi-Fix-out-of-bounds-access-in-grub_acpi_xsdt_find.patch \ No newline at end of file +Patch0282: 0282-acpi-Fix-out-of-bounds-access-in-grub_acpi_xsdt_find.patch +Patch0283: 0283-fs-xfs-Fix-large-extent-counters-incompat-feature-su.patch diff --git a/grub2.spec b/grub2.spec index 524f74b..17d5d53 100644 --- a/grub2.spec +++ b/grub2.spec @@ -17,7 +17,7 @@ Name: grub2 Epoch: 1 Version: 2.12 -Release: 4%{?dist}.alma.1 +Release: 5%{?dist}.alma.1 Summary: Bootloader with support for Linux, Multiboot and more License: GPL-3.0-or-later URL: http://www.gnu.org/software/grub/ @@ -574,9 +574,13 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg %endif %changelog -* Thu Jan 16 2025 Eduard Abdullin - 2.12-4.alma.1 +* Fri Jan 24 2025 2025 Eduard Abdullin - 2.12-5.alma.1 - Debrand for AlmaLinux +* Thu Jan 09 2025 Nicolas Frayer 2.12-5 +- fs/xfs: fix large extent counters incompat feature support +- Resolves: #RHEL-68390 + * Mon Dec 09 2024 Leo Sandoval 2.12-4 - Remove BLS fake config in case of kernel removal - Resolves: #RHEL-59557