mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Jacek Tomaka <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tglx@linutronix.de, timb@dug.com, mingo@kernel.org, bp@suse.de,
	hpa@zytor.com, linux-kernel@vger.kernel.org,
	jacek.tomaka@poczta.fm
Subject: [tip:x86/microcode] x86/microcode: Make revision and processor flags world-readable
Date: Sun, 2 Sep 2018 05:12:55 -0700	[thread overview]
Message-ID: <tip-f4661d293eb2d01dfc742982761a36fafe456d46@git.kernel.org> (raw)
In-Reply-To: <20180825035039.14409-1-jacekt@dugeo.com>

Commit-ID:  f4661d293eb2d01dfc742982761a36fafe456d46
Gitweb:     https://git.kernel.org/tip/f4661d293eb2d01dfc742982761a36fafe456d46
Author:     Jacek Tomaka <jacek.tomaka@poczta.fm>
AuthorDate: Sat, 25 Aug 2018 11:50:39 +0800
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sun, 2 Sep 2018 14:09:13 +0200

x86/microcode: Make revision and processor flags world-readable

The microcode revision is already readable for non-root users via
/proc/cpuinfo. Thus, there's no reason to keep the same information
readable by root only in /sys/devices/system/cpu/cpuX/microcode/.

Make .../processor_flags world-readable too, while at it.

Reported-by: Tim Burgess <timb@dug.com>
Signed-off-by: Jacek Tomaka <jacek.tomaka@poczta.fm>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20180825035039.14409-1-jacekt@dugeo.com

---
 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 b9bc8a1a584e..2637ff09d6a0 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,

      parent reply	other threads:[~2018-09-02 12:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-bot for Jacek Tomaka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-f4661d293eb2d01dfc742982761a36fafe456d46@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=jacek.tomaka@poczta.fm \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=timb@dug.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome