Files
systemd/src
Zbigniew Jędrzejewski-Szmek 85830b0d62 ukify: fix version detection for aarch64 zboot kernels with gzip or lzma compression
Fixes https://github.com/systemd/systemd/issues/34780. The number in the header
is the size of the *compressed* data, so for gzip we'd read the initial part of
the decompressed data (equal to the size of the compressed data) and not find
the version string. Later on, Fedora switched to zstd compression, and there we
correctly use the number as the size of the compressed data, so we stopped
hitting the issue, but we should still fix it for older kernels.

I verified that the fix works for gzip-compressed kernels. I also made the same
change for the code for lzma compression. I'm pretty sure it is the right thing,
even though I don't have such a kernel at hand to test.

>>> ukify.Uname.scrape('/lib/modules/6.12.0-0.rc2.24.fc42.aarch64/vmlinuz')
Real-Mode Kernel Header magic not found
+ readelf --notes /lib/modules/6.12.0-0.rc2.24.fc42.aarch64/vmlinuz
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
Found uname version: 6.12.0-0.rc2.24.fc42.aarch64
2025-07-10 13:37:07 +09:00
..
2025-07-06 13:31:17 +02:00
2025-05-14 22:34:02 +02:00
2025-05-14 22:34:02 +02:00
2025-05-14 22:34:02 +02:00
2025-05-14 22:34:02 +02:00
2025-05-21 10:49:42 +02:00
2025-05-21 10:49:42 +02:00
2025-05-22 21:10:15 +02:00
2025-06-06 19:06:48 +09:00
2025-05-14 22:34:02 +02:00
2025-05-21 10:49:42 +02:00
2025-05-24 16:58:55 +02:00
2025-05-14 22:34:02 +02:00
2025-05-14 22:34:02 +02:00
2025-05-14 22:34:02 +02:00
2025-05-14 22:34:02 +02:00
2025-07-03 11:22:34 +02:00
2025-05-15 00:01:59 +02:00
2025-05-15 00:01:59 +02:00
2025-05-15 00:01:59 +02:00
2025-05-15 00:01:59 +02:00
2025-07-03 17:43:01 +02:00
2025-05-14 22:34:02 +02:00
2025-05-21 10:49:42 +02:00
2025-05-21 10:49:42 +02:00
2025-05-21 10:49:42 +02:00
2025-05-21 10:49:42 +02:00
2025-05-14 22:34:02 +02:00
2025-05-21 10:49:42 +02:00
2025-05-21 10:49:42 +02:00
2025-07-03 08:44:47 +09:00
2025-05-21 10:49:42 +02:00
2025-05-21 10:49:42 +02:00
2025-06-28 17:18:35 +02:00
2025-05-14 22:34:02 +02:00