mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/microcode: allow non-root reading of microcode version and processor flags
@ 2018-08-25  3:50 Jacek Tomaka
  2018-08-26 11:52 ` Boris Petkov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jacek Tomaka @ 2018-08-25  3:50 UTC (permalink / raw)
  To: Thomas Gleixner, linux-kernel; +Cc: Jacek Tomaka, Jacek Tomaka

/sys/devices/system/cpu/cpuX/microcode

Before:
-r-------- processor_flags
-r-------- version

After:
-r--r--r-- processor_flags
-r--r--r-- version

Microcode version has been already readable for non root users via
/proc/cpuinfo. However it is easier to access it from
/sys/devices/system/cpu/cpuX/microcode/version

Reported-by: Tim Burgess <timb@dug.com>
Signed-off-by: Jacek Tomaka <jacek.tomaka@poczta.fm>
---
 arch/x86/kernel/cpu/microcode/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index b9bc8a1a58..2637ff09d6 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -666,8 +666,8 @@ static ssize_t pf_show(struct device *dev,
 }
 
 static DEVICE_ATTR_WO(reload);
-static DEVICE_ATTR(version, 0400, version_show, NULL);
-static DEVICE_ATTR(processor_flags, 0400, pf_show, NULL);
+static DEVICE_ATTR(version, 0444, version_show, NULL);
+static DEVICE_ATTR(processor_flags, 0444, pf_show, NULL);
 
 static struct attribute *mc_default_attrs[] = {
 	&dev_attr_version.attr,
-- 
2.17.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-09-02 12:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-25  3:50 [PATCH] x86/microcode: allow non-root reading of microcode version and processor flags Jacek Tomaka
2018-08-26 11:52 ` Boris Petkov
2018-08-26 12:23   ` Jacek Tomaka
2018-08-27  4:06     ` Borislav Petkov
     [not found]       ` <CAKVxXCUMy97PzmB=zrMg_kemLooA3LHTvAPruQh2w41CU=B+Dg@mail.gmail.com>
2018-08-27  7:30         ` Borislav Petkov
2018-08-27  7:52 ` Borislav Petkov
2018-08-27  8:05   ` Jacek Tomaka
2018-08-27 14:50     ` Borislav Petkov
2018-09-02 12:12 ` [tip:x86/microcode] x86/microcode: Make revision and processor flags world-readable tip-bot for Jacek Tomaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®