-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
platomov-cpumicrocodes: init at 0-unstable-2025-05-12 #413202
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
base: master
Are you sure you want to change the base?
Conversation
This is a prerequisite to having something like ucodenix in Nixpkgs Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
a45ab6d
to
cfc176d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can we trust this repo? How can we guarantee the files are from where they claim to be and their integrity?
Duplicate of #336331 |
Because there's a hash check every single time Nix build a derivation. Why did you 👎 the PR ? |
Wouldn't it be worth to try fixing My take here for this derivation is: find out the procedure @platomav uses to extract these files, and reproduce it here with Nix instead, fetching the files directly from Microsoft/AMD/BIOS manufacturers. Make it safe!
I clearly disagree with running code from a random repo in a security ring deeper than the kernel itself. Microcode was used as a backdoor by researchers before. This was brought up before and rejected by others as well: https://discourse.nixos.org/t/amd-microcode-updates-not-applying/31923/20 Anyway, I don't have the authority to reject this, but should be something for |
Admittedly I had considered the security implications of this, ie, trusting microcode updates from a GitHub repo. I was unsure so I thought it would be better to have a PR up for discussion as a starting point.
Wish I had seen it before :)
I agree. However I would argue that just having this package merged doesn't let any one deliberately use it. Unlike #336331, which packs it properly into a |
We have official microcode releases from both Intel and AMD. Why this? |
The main reason for the existence of solutions like ucodenix is that AMD allegedly doesn't update microcode for their consumer level CPUs (only for server grade CPUs) through linux-firmware. They are only distributed through BIOS updates.12 This has been observed by other users as well.3 Not using the latest BIOS means that you'll be left out. That itself is a security issue that AMD themselves raise. Admittedly I can not verify the authenticity of microcodes in platomav's repo, but it is claimed that they are signed by their vendors as they come from official sources. Footnotes |
Counterpoint. On a Ryzen 5600X:
Looking at https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/amd-ucode/README I learn that this processor gets microcode from That file was updated quite a bit over the last few years, but indeed mostly only for a very select list of CPUs. The latest ucode bump (2024-11-21) however added quite a few models, including the Ryzen 5600X as seen above. So it is possible they've neglected shipping microcode updates for consumer CPUs in the past. But is that still true? I find it difficult to retrieve microcode updates from arbitrary sources, because even though they might be signed we don't have any changelog or knowledge whether these updates are specific to an OEM platform. |
Also does it work with a kernel > 6.13.6? I was under the impression that since https://bughunters.google.com/blog/5424842357473280/zen-and-the-art-of-microcode-hacking (which is pretty bad if the origin of the microcode cannot be proven), older microcode would not be loaded due to gregkh/linux@c162ba4 |
Yes, if as far as I can tell, at least for my CPU Ryzen 5 7600, microcode for it from platomov's repo is signed by AMD, and it loads perfectly. Which wouldn't otherwise be possible, without turning the verification explicitly off using something like this (NOT RECOMMENDED): boot.kernelParams = [ "microcode.amd_sha_check=off" ]; |
Hello! I am the author of #336331. Regarding the possible security issues, as far as I understand, on a Kernel > 6.13.6:
In my opinion, I would leave the choice to the user (and I don't think that packing the images into |
Yeah, given that all microcode is signed we could make this a user decision. |
I agree, however the current microcode option interface doesn't allow it, I have made a PR. #434472 |
This package is just for getting the latest microcodes for Intel, AMD, VIA & Freescale CPUs from https://github.com/platomav/CPUMicrocodes.
At some point I would like to implement ucodenix in house, as well. But that's for another day.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.