Revert " Handle non-continuous data blocks in"
This reverts commit 242fa05f2412202b241bbea01dc2bd69214b2e33.
This commit is contained in:
parent
242fa05f24
commit
fd1e9fdd65
@ -1,41 +0,0 @@
|
|||||||
From edb3f9c9b1fd510775332e6788dc1a4d4af68666 Mon Sep 17 00:00:00 2001
|
|
||||||
From: openEuler Buildteam <buildteam@openEuler.org>
|
|
||||||
Date: Sat, 11 May 2024 09:22:03 +0800
|
|
||||||
Subject: [PATCH] Handle non-continuous data blocks in directory extents
|
|
||||||
|
|
||||||
---
|
|
||||||
grub-core/fs/xfs.c | 11 +++++++++++
|
|
||||||
1 file changed, 11 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
|
|
||||||
index 1ce5fa4..ed52586 100644
|
|
||||||
--- a/grub-core/fs/xfs.c
|
|
||||||
+++ b/grub-core/fs/xfs.c
|
|
||||||
@@ -904,6 +904,7 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
|
|
||||||
|
|
||||||
int entries = -1;
|
|
||||||
char *end = dirblock + dirblk_size;
|
|
||||||
+ grub_uint32_t magic;
|
|
||||||
|
|
||||||
numread = grub_xfs_read_file (dir, 0, 0,
|
|
||||||
blk << dirblk_log2,
|
|
||||||
@@ -914,6 +915,16 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /*
|
|
||||||
+ * If this data block isn't actually part of the extent list then
|
|
||||||
+ * grub_xfs_read_file() returns a block of zeros. So, if the magic
|
|
||||||
+ * number field is all zeros then this block should be skipped.
|
|
||||||
+ */
|
|
||||||
+ magic = *(grub_uint32_t *)(void *) dirblock;
|
|
||||||
+ if (!magic)
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* Leaf and tail information are only in the data block if the number
|
|
||||||
* of extents is 1.
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
@ -227,4 +227,3 @@ Patch226: 0038-Add-grub-get-kernel-settings-and-use-it-in-10_linux.patch
|
|||||||
Patch227: 0084-grub-editenv-Add-incr-command-to-increment-integer-v.patch
|
Patch227: 0084-grub-editenv-Add-incr-command-to-increment-integer-v.patch
|
||||||
Patch228: 0002-Revert-templates-Properly-disable-the-os-prober-by-d.patch
|
Patch228: 0002-Revert-templates-Properly-disable-the-os-prober-by-d.patch
|
||||||
Patch229: 0003-Revert-templates-Disable-the-os-prober-by-default.patch
|
Patch229: 0003-Revert-templates-Disable-the-os-prober-by-default.patch
|
||||||
Patch230: Handle-non-continuous-data-blocks-in-directory-exten.patch
|
|
||||||
|
|||||||
12
grub2.spec
12
grub2.spec
@ -14,7 +14,7 @@
|
|||||||
Name: grub2
|
Name: grub2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.12
|
Version: 2.12
|
||||||
Release: 10
|
Release: 9
|
||||||
Summary: Bootloader with support for Linux, Multiboot and more
|
Summary: Bootloader with support for Linux, Multiboot and more
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: http://www.gnu.org/software/grub/
|
URL: http://www.gnu.org/software/grub/
|
||||||
@ -447,16 +447,6 @@ fi
|
|||||||
%{_datadir}/man/man*
|
%{_datadir}/man/man*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat May 11 2024 xiaozai <xiaozai@kylinos.cn> - 1:2.12-10
|
|
||||||
- Type:bugfix
|
|
||||||
- CVE:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:Handle non-continuous data blocks in directory extents
|
|
||||||
The directory extent list does not have to be a continuous list of data
|
|
||||||
blocks. When GRUB tries to read a non-existant member of the list,
|
|
||||||
grub_xfs_read_file() will return a block of zero'ed memory. Checking for
|
|
||||||
a zero'ed magic number is sufficient to skip this non-existant data block.
|
|
||||||
|
|
||||||
* Tue May 7 2024 zhangqiumiao <zhangqiumiao1@huawei.com> - 1:2.12-9
|
* Tue May 7 2024 zhangqiumiao <zhangqiumiao1@huawei.com> - 1:2.12-9
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user