Commit 311c34a
btrfs-progs: crypto: x86/crc32c - access 32-bit arguments as 32-bit
(Linux kernel commit eebcadfa21e66a893846ec168fb7c26a46a510cd).
Fix crc32c-pcl-intel-asm_64.S to access 32-bit arguments as 32-bit
values instead of 64-bit, since the upper bits of the corresponding
64-bit registers are not guaranteed to be zero. Also update the type of
the length argument to be unsigned int rather than int, as the assembly
code treats it as unsigned.
Note: there haven't been any reports of this bug actually causing
incorrect behavior. Neither gcc nor clang guarantee zero-extension to
64 bits, but zero-extension is likely to happen in practice because most
instructions that operate on 32-bit registers zero-extend to 64 bits.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 55deb32 commit 311c34a
2 files changed
+27
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 80 | + | |
| 81 | + | |
85 | 82 | | |
86 | | - | |
87 | | - | |
| 83 | + | |
| 84 | + | |
88 | 85 | | |
89 | 86 | | |
90 | 87 | | |
| |||
112 | 109 | | |
113 | 110 | | |
114 | 111 | | |
115 | | - | |
| 112 | + | |
116 | 113 | | |
117 | | - | |
| 114 | + | |
118 | 115 | | |
119 | 116 | | |
120 | 117 | | |
| |||
126 | 123 | | |
127 | 124 | | |
128 | 125 | | |
129 | | - | |
130 | 126 | | |
131 | | - | |
| 127 | + | |
132 | 128 | | |
133 | 129 | | |
134 | 130 | | |
135 | 131 | | |
136 | 132 | | |
137 | | - | |
| 133 | + | |
138 | 134 | | |
139 | 135 | | |
140 | 136 | | |
| |||
183 | 179 | | |
184 | 180 | | |
185 | 181 | | |
186 | | - | |
| 182 | + | |
187 | 183 | | |
188 | 184 | | |
189 | 185 | | |
| |||
193 | 189 | | |
194 | 190 | | |
195 | 191 | | |
196 | | - | |
| 192 | + | |
197 | 193 | | |
198 | 194 | | |
199 | 195 | | |
| |||
207 | 203 | | |
208 | 204 | | |
209 | 205 | | |
210 | | - | |
| 206 | + | |
211 | 207 | | |
212 | | - | |
| 208 | + | |
213 | 209 | | |
214 | 210 | | |
215 | 211 | | |
| |||
218 | 214 | | |
219 | 215 | | |
220 | 216 | | |
221 | | - | |
222 | | - | |
| 217 | + | |
| 218 | + | |
223 | 219 | | |
224 | 220 | | |
225 | 221 | | |
226 | 222 | | |
227 | 223 | | |
228 | 224 | | |
229 | 225 | | |
230 | | - | |
231 | | - | |
| 226 | + | |
232 | 227 | | |
233 | | - | |
| 228 | + | |
234 | 229 | | |
235 | 230 | | |
236 | 231 | | |
| |||
239 | 234 | | |
240 | 235 | | |
241 | 236 | | |
242 | | - | |
| 237 | + | |
243 | 238 | | |
244 | 239 | | |
245 | 240 | | |
246 | | - | |
| 241 | + | |
247 | 242 | | |
248 | 243 | | |
249 | 244 | | |
250 | 245 | | |
251 | | - | |
| 246 | + | |
252 | 247 | | |
253 | | - | |
| 248 | + | |
254 | 249 | | |
255 | 250 | | |
256 | | - | |
| 251 | + | |
257 | 252 | | |
258 | | - | |
| 253 | + | |
259 | 254 | | |
260 | 255 | | |
261 | | - | |
| 256 | + | |
262 | 257 | | |
263 | | - | |
| 258 | + | |
264 | 259 | | |
265 | | - | |
| 260 | + | |
266 | 261 | | |
267 | 262 | | |
268 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments