Re: [PATCH] x86/microcode: allow non-root reading of microcode version and processor flags
From: Borislav Petkov
Date: Mon Aug 27 2018 - 00:06:27 EST
On Sun, Aug 26, 2018 at 08:23:48PM +0800, Jacek Tomaka wrote:
> I am trying to get microcode version from user space. Reading it
> from /proc/cpuinfo requires greping/awking to extract the bits of
> information that are readily available in microcode/version.
If the only reason is because you find it hard to grep/awk, I won't
take it.
> Any reason why the same piece of information has different access
> permissions, depending on the way it is accessed?
I don't see any particular reason in the original commit which added it:
9a4b9efa1d39 ("[PATCH] x86 microcode: add sysfs and hotplug support")
except maybe because the reload interface is root-only so making the
others root-only too, made sense.
However, we've made the microcode revision available to everyone in
/proc/cpuinfo, in the meantime, so I guess there's no point in keeping
the version file root-only anymore. And I guess the processor flags too,
while we're at it.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--