Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AuthenticAMD.bin includes README, breaking early loading #2541

Open
champtar opened this issue Oct 27, 2023 · 1 comment · Fixed by openSUSE/dracut#302 or dracut-ng/dracut-ng#26 · May be fixed by #2544
Open

AuthenticAMD.bin includes README, breaking early loading #2541

champtar opened this issue Oct 27, 2023 · 1 comment · Fixed by openSUSE/dracut#302 or dracut-ng/dracut-ng#26 · May be fixed by #2544
Labels
bug Our bugs

Comments

@champtar
Copy link

Describe the bug
Dracut builds AuthenticAMD.bin by doing more or less cat /usr/lib/firmware/amd-ucode/* > AuthenticAMD.bin
Since https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/amd-ucode/README?id=89ec6198f13d1007563ff87aae5de209e993be07 the folder contains a README file.

Distribution used
Alma 8 / Alma 9 / Fedora 38

Dracut version
dracut-049-223.git20230119.el8.x86_64
dracut-057-21.git20230214.el9.x86_64
dracut-059-4.fc38.x86_64

Init system
systemd

To Reproduce

# LANG=C LC_ALL=C bash -c 'for i in/usr/lib/firmware/amd-ucode/*; do echo $i; done'
# dracut -N initramfs-test.img 6.5.6-200.fc38.x86_64
# lsinitrd --unpackearly initramfs-test.img
# binwalk kernel/x86/microcode/AuthenticAMD.bin 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             xz compressed data <-------- should not be there
1316          0x524           Intel x86 or x64 microcode, sig 0x01000083, pf_mask 0x00, 2008-04-30, rev 0x03c0, size 4130
...

Expected behavior
README (or README.xz or ...) is not part of AuthenticAMD.bin

Additional context
GenuineIntel.bin seems ok when looking at it with binwalk
I only validated that this is a problem with Alma 8 kernel, maybe newer version have some extra patches to ignore extra data, but we should still remove README*

@champtar champtar added the bug Our bugs label Oct 27, 2023
@champtar champtar changed the title AuthenticAMD.bin early loading fails if README is first AuthenticAMD.bin includes README, breaking early loading Oct 27, 2023
@aafeijoo-suse aafeijoo-suse linked a pull request Oct 30, 2023 that will close this issue
3 tasks
@aafeijoo-suse
Copy link
Member

In SUSE this issue was fixed via packaging:

# rpm -ql ucode-amd
/usr/lib/firmware
/usr/lib/firmware/amd-ucode
/usr/lib/firmware/amd-ucode/microcode_amd.bin
/usr/lib/firmware/amd-ucode/microcode_amd_fam15h.bin
/usr/lib/firmware/amd-ucode/microcode_amd_fam16h.bin
/usr/lib/firmware/amd-ucode/microcode_amd_fam17h.bin
/usr/lib/firmware/amd-ucode/microcode_amd_fam19h.bin
/usr/share/doc/packages/ucode-amd
/usr/share/doc/packages/ucode-amd/README
/usr/share/licenses/ucode-amd
/usr/share/licenses/ucode-amd/LICENSE.amd-ucode

But I see this was not done in other distros, a patch is waiting in #2544

@aafeijoo-suse aafeijoo-suse reopened this Nov 27, 2023
archlinux-github pushed a commit to archlinux/aur that referenced this issue Mar 3, 2024
@aafeijoo-suse aafeijoo-suse reopened this Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment