1 |
commit: 7719b94e9a4bf646322889da6eafc121fdfeb1a9 |
2 |
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at> |
3 |
AuthorDate: Wed Sep 28 16:53:38 2022 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 28 19:31:52 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7719b94e |
7 |
|
8 |
sys-boot/grub: remove unused patches |
9 |
|
10 |
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at> |
11 |
Closes: https://github.com/gentoo/gentoo/pull/27516 |
12 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
13 |
|
14 |
sys-boot/grub/files/grub-2.06-binutils-2.36.patch | 44 -------- |
15 |
sys-boot/grub/files/grub-2.06-xfs-v4.patch | 120 ---------------------- |
16 |
2 files changed, 164 deletions(-) |
17 |
|
18 |
diff --git a/sys-boot/grub/files/grub-2.06-binutils-2.36.patch b/sys-boot/grub/files/grub-2.06-binutils-2.36.patch |
19 |
deleted file mode 100644 |
20 |
index 5cb327003adb..000000000000 |
21 |
--- a/sys-boot/grub/files/grub-2.06-binutils-2.36.patch |
22 |
+++ /dev/null |
23 |
@@ -1,44 +0,0 @@ |
24 |
-From 5cea201f288246488e2189c49d969d00ebec2898 Mon Sep 17 00:00:00 2001 |
25 |
-From: Michael Chang <mchang@××××.com> |
26 |
-Date: Fri, 19 Feb 2021 17:40:43 +0800 |
27 |
-Subject: [PATCH] Fix build error in binutils 2.36 |
28 |
- |
29 |
-The build fails in binutils 2.36 |
30 |
- |
31 |
-[ 520s] cat kernel_syms.lst > syminfo.lst.new |
32 |
-[ 520s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: section .note.gnu.property VMA [0000000000400158,0000000000400187] overlaps section .bss VMA [000000000000f000,000000000041e1af] |
33 |
- |
34 |
-It is caused by assembler now generates the GNU property notes section |
35 |
-by default. Use the assmbler option -mx86-used-note=no to disable the |
36 |
-section from being generated to workaround the ensuing linker issue. |
37 |
- |
38 |
-Signed-off-by: Michael Chang <mchang@××××.com> |
39 |
---- |
40 |
- configure.ac | 14 ++++++++++++++ |
41 |
- 1 file changed, 14 insertions(+) |
42 |
- |
43 |
-diff --git a/configure.ac b/configure.ac |
44 |
-index fa8f74bb9..38ee5f579 100644 |
45 |
---- a/configure.ac |
46 |
-+++ b/configure.ac |
47 |
-@@ -836,6 +836,20 @@ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$p |
48 |
- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow" |
49 |
- fi |
50 |
- |
51 |
-+if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ); then |
52 |
-+ AC_CACHE_CHECK([whether -Wa,-mx86-used-note works], [grub_cv_cc_mx86_used_note], [ |
53 |
-+ CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no -Werror" |
54 |
-+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], |
55 |
-+ [grub_cv_cc_mx86_used_note=yes], |
56 |
-+ [grub_cv_cc_mx86_used_note=no]) |
57 |
-+ ]) |
58 |
-+ |
59 |
-+ if test "x$grub_cv_cc_mx86_used_note" = xyes; then |
60 |
-+ TARGET_CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no" |
61 |
-+ TARGET_CCASFLAGS="$TARGET_CCASFLAGS -Wa,-mx86-used-note=no" |
62 |
-+ fi |
63 |
-+fi |
64 |
-+ |
65 |
- # GRUB doesn't use float or doubles at all. Yet some toolchains may decide |
66 |
- # that floats are a good fit to run instead of what's written in the code. |
67 |
- # Given that floating point unit is disabled (if present to begin with) |
68 |
|
69 |
diff --git a/sys-boot/grub/files/grub-2.06-xfs-v4.patch b/sys-boot/grub/files/grub-2.06-xfs-v4.patch |
70 |
deleted file mode 100644 |
71 |
index fe8223780384..000000000000 |
72 |
--- a/sys-boot/grub/files/grub-2.06-xfs-v4.patch |
73 |
+++ /dev/null |
74 |
@@ -1,120 +0,0 @@ |
75 |
-From a4b495520e4dc41a896a8b916a64eda9970c50ea Mon Sep 17 00:00:00 2001 |
76 |
-From: Erwan Velu <erwanaliasr1@×××××.com> |
77 |
-Date: Wed, 25 Aug 2021 15:31:52 +0200 |
78 |
-Subject: fs/xfs: Fix unreadable filesystem with v4 superblock |
79 |
- |
80 |
-The commit 8b1e5d193 (fs/xfs: Add bigtime incompat feature support) |
81 |
-introduced the bigtime support by adding some features in v3 inodes. |
82 |
-This change extended grub_xfs_inode struct by 76 bytes but also changed |
83 |
-the computation of XFS_V2_INODE_SIZE and XFS_V3_INODE_SIZE. Prior this |
84 |
-commit, XFS_V2_INODE_SIZE was 100 bytes. After the commit it's 84 bytes |
85 |
-XFS_V2_INODE_SIZE becomes 16 bytes too small. |
86 |
- |
87 |
-As a result, the data structures aren't properly aligned and the GRUB |
88 |
-generates "attempt to read or write outside of partition" errors when |
89 |
-trying to read the XFS filesystem: |
90 |
- |
91 |
- GNU GRUB version 2.11 |
92 |
- .... |
93 |
- grub> set debug=efi,gpt,xfs |
94 |
- grub> insmod part_gpt |
95 |
- grub> ls (hd0,gpt1)/ |
96 |
- partmap/gpt.c:93: Read a valid GPT header |
97 |
- partmap/gpt.c:115: GPT entry 0: start=4096, length=1953125 |
98 |
- fs/xfs.c:931: Reading sb |
99 |
- fs/xfs.c:270: Validating superblock |
100 |
- fs/xfs.c:295: XFS v4 superblock detected |
101 |
- fs/xfs.c:962: Reading root ino 128 |
102 |
- fs/xfs.c:515: Reading inode (128) - 64, 0 |
103 |
- fs/xfs.c:515: Reading inode (739521961424144223) - 344365866970255880, 3840 |
104 |
- error: attempt to read or write outside of partition. |
105 |
- |
106 |
-This commit change the XFS_V2_INODE_SIZE computation by subtracting 76 |
107 |
-bytes instead of 92 bytes from the actual size of grub_xfs_inode struct. |
108 |
-This 76 bytes value comes from added members: |
109 |
- 20 grub_uint8_t unused5 |
110 |
- 1 grub_uint64_t flags2 |
111 |
- 48 grub_uint8_t unused6 |
112 |
- |
113 |
-This patch explicitly splits the v2 and v3 parts of the structure. |
114 |
-The unused4 is still ending of the v2 structures and the v3 starts |
115 |
-at unused5. Thanks to this we will avoid future corruptions of v2 |
116 |
-or v3 inodes. |
117 |
- |
118 |
-The XFS_V2_INODE_SIZE is returning to its expected size and the |
119 |
-filesystem is back to a readable state: |
120 |
- |
121 |
- GNU GRUB version 2.11 |
122 |
- .... |
123 |
- grub> set debug=efi,gpt,xfs |
124 |
- grub> insmod part_gpt |
125 |
- grub> ls (hd0,gpt1)/ |
126 |
- partmap/gpt.c:93: Read a valid GPT header |
127 |
- partmap/gpt.c:115: GPT entry 0: start=4096, length=1953125 |
128 |
- fs/xfs.c:931: Reading sb |
129 |
- fs/xfs.c:270: Validating superblock |
130 |
- fs/xfs.c:295: XFS v4 superblock detected |
131 |
- fs/xfs.c:962: Reading root ino 128 |
132 |
- fs/xfs.c:515: Reading inode (128) - 64, 0 |
133 |
- fs/xfs.c:515: Reading inode (128) - 64, 0 |
134 |
- fs/xfs.c:931: Reading sb |
135 |
- fs/xfs.c:270: Validating superblock |
136 |
- fs/xfs.c:295: XFS v4 superblock detected |
137 |
- fs/xfs.c:962: Reading root ino 128 |
138 |
- fs/xfs.c:515: Reading inode (128) - 64, 0 |
139 |
- fs/xfs.c:515: Reading inode (128) - 64, 0 |
140 |
- fs/xfs.c:515: Reading inode (128) - 64, 0 |
141 |
- fs/xfs.c:515: Reading inode (131) - 64, 768 |
142 |
- efi/ fs/xfs.c:515: Reading inode (3145856) - 1464904, 0 |
143 |
- grub2/ fs/xfs.c:515: Reading inode (132) - 64, 1024 |
144 |
- grub/ fs/xfs.c:515: Reading inode (139) - 64, 2816 |
145 |
- grub> |
146 |
- |
147 |
-Fixes: 8b1e5d193 (fs/xfs: Add bigtime incompat feature support) |
148 |
- |
149 |
-Signed-off-by: Erwan Velu <e.velu@××××××.com> |
150 |
-Tested-by: Carlos Maiolino <cmaiolino@××××××.com> |
151 |
-Reviewed-by: Daniel Kiper <daniel.kiper@××××××.com> |
152 |
---- |
153 |
- grub-core/fs/xfs.c | 14 ++++++++++---- |
154 |
- 1 file changed, 10 insertions(+), 4 deletions(-) |
155 |
- |
156 |
-diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c |
157 |
-index 0f524c3a8..e3816d1ec 100644 |
158 |
---- a/grub-core/fs/xfs.c |
159 |
-+++ b/grub-core/fs/xfs.c |
160 |
-@@ -192,6 +192,11 @@ struct grub_xfs_time_legacy |
161 |
- grub_uint32_t nanosec; |
162 |
- } GRUB_PACKED; |
163 |
- |
164 |
-+/* |
165 |
-+ * The struct grub_xfs_inode layout was taken from the |
166 |
-+ * struct xfs_dinode_core which is described here: |
167 |
-+ * https://mirrors.edge.kernel.org/pub/linux/utils/fs/xfs/docs/xfs_filesystem_structure.pdf |
168 |
-+ */ |
169 |
- struct grub_xfs_inode |
170 |
- { |
171 |
- grub_uint8_t magic[2]; |
172 |
-@@ -208,14 +213,15 @@ struct grub_xfs_inode |
173 |
- grub_uint32_t nextents; |
174 |
- grub_uint16_t unused3; |
175 |
- grub_uint8_t fork_offset; |
176 |
-- grub_uint8_t unused4[37]; |
177 |
-+ grub_uint8_t unused4[17]; /* Last member of inode v2. */ |
178 |
-+ grub_uint8_t unused5[20]; /* First member of inode v3. */ |
179 |
- grub_uint64_t flags2; |
180 |
-- grub_uint8_t unused5[48]; |
181 |
-+ grub_uint8_t unused6[48]; /* Last member of inode v3. */ |
182 |
- } GRUB_PACKED; |
183 |
- |
184 |
- #define XFS_V3_INODE_SIZE sizeof(struct grub_xfs_inode) |
185 |
--/* Size of struct grub_xfs_inode until fork_offset (included). */ |
186 |
--#define XFS_V2_INODE_SIZE (XFS_V3_INODE_SIZE - 92) |
187 |
-+/* Size of struct grub_xfs_inode v2, up to unused4 member included. */ |
188 |
-+#define XFS_V2_INODE_SIZE (XFS_V3_INODE_SIZE - 76) |
189 |
- |
190 |
- struct grub_xfs_dirblock_tail |
191 |
- { |
192 |
--- |
193 |
-cgit v1.2.1 |
194 |
- |