so what grub is doing is correct.

It pads/aligns every initrd by 4, which is fine, and as per spec.

https://www.kernel.org/doc/html/latest/driver-api/early-userspace
/buffer-format.html

initramfs size can be filled with arbitrary amount of "\0" all the way
upto initramfs_size.

"In human terms, the initramfs buffer contains a collection of
compressed and/or uncompressed cpio archives (in the “newc” or “crc”
formats); arbitrary amounts zero bytes (for padding) can be added
between members."

Thus it feels to me that decompress_unlz4.c method in the kernel does
not correctly stop decompressing and returning consumed output position
(posp).

For example, decompress_inflate.c skips over trailer and updates output
pos by 8, at the end of successful conversion.

Similarly unlzma also updates posp at the end of conversion.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1835660

Title:
  initramfs unpacking failed

To manage notifications about this bug go to:
https://bugs.launchpad.net/oem-priority/+bug/1835660/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to