All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Chouquet-Stringer <me@mathieu.digital>
To: Matthew Garrett <mjg59@google.com>
Cc: Chris Down <chris@chrisdown.name>, Borislav Petkov <bp@alien8.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	sean.j.christopherson@intel.com, tony.luck@intel.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	the arch/x86 maintainers <x86@kernel.org>,
	kernel-team@fb.com
Subject: Re: [PATCH -v2.1] x86/msr: Filter MSR writes
Date: Tue, 17 Nov 2020 22:00:18 +0100	[thread overview]
Message-ID: <20201117210018.GA4247@weirdfishes> (raw)
In-Reply-To: <CACdnJuvfhjMNQUYNYWpPMfwTE3xHi7UNPm7HEwUMv_1F3KT4gA@mail.gmail.com>

Hello all,

On Tue, Jul 14, 2020 at 12:17:50PM -0700, Matthew Garrett wrote:
> On Tue, Jul 14, 2020 at 9:04 AM Chris Down <chris@chrisdown.name> wrote:
> > Either way, again, this isn't really the point. :-) The point is that there
> > _are_ currently widespread cases involving poking MSRs from userspace, however
> > sacrilegious or ugly (which I agree with!), and while people should be told
> > about that, it's excessive to have the potential to take up 80% of kmsg in the
> > default configuration. It doesn't take thousands of messages to get the message
> > across, that's what a custom printk ratelimit is for.

> Agreed - we should now offer all the necessary interfaces to avoid
> userspace having to hit MSRs directly for thermal management, but that
> wasn't always the case, and as a result there's tooling that still
> behaves this way.

I'm late to the party but it seems allowing MSR_IA32_ENERGY_PERF_BIAS
has the downside of flagging the kernel as tainted without telling you
why if you use something like x86_energy_perf_policy (from
tools/power/x86/x86_energy_perf_policy) which itself is used by tuned.

I can taint my kernel manually by just running:
x86_energy_perf_policy -c all performance

The net impact is an OOPS triggered on such kernel won't necessarily be
read by anyone nor analyzed by reporting tools as the kernel is now
considered tainted.

For instance abrt reports the following:
===========8<===========8<===========8<===========8<===========8<===========8<
A kernel problem occurred, but your kernel has been tainted (flags:GS).
Explanation:
S - SMP with CPUs not designed for SMP.
Kernel maintainers are unable to diagnose tainted reports.
===========8<===========8<===========8<===========8<===========8<===========8<

To add to the confusion, kernel documentation
(Documentation/admin-guide/tainted-kernels.rst) is not up to date so
while looking for an explanation, one gets to wonder how what used to be
a regular average computer can now be classified as something using "an
officially SMP incapable processor"...

So while both documentation and tools should be updated as to be clearer
and to not taint the kernel respectively, there's something that remains
to be done to explain why or how the kernel got tainted because of
poking into MSRs...

-- 
Mathieu Chouquet-Stringer
            The sun itself sees not till heaven clears.
	             -- William Shakespeare --

  reply	other threads:[~2020-11-17 21:03 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12 10:50 [RFC PATCH] x86/msr: Filter MSR writes Borislav Petkov
2020-06-12 16:34 ` Sean Christopherson
2020-06-12 16:46   ` Borislav Petkov
2020-06-12 16:57     ` Sean Christopherson
2020-06-12 17:03       ` Borislav Petkov
2020-06-12 17:43         ` Sean Christopherson
2020-06-12 17:52           ` Borislav Petkov
2020-06-12 17:20 ` Linus Torvalds
2020-06-12 17:48   ` Borislav Petkov
2020-06-12 19:47     ` Borislav Petkov
2020-06-12 20:39     ` Peter Zijlstra
2020-06-13  5:40       ` Tony Luck
2020-06-13  9:39       ` Borislav Petkov
2020-06-13 15:48 ` [PATCH -v2] " Borislav Petkov
2020-06-15  6:38   ` [PATCH -v2.1] " Borislav Petkov
2020-06-25  5:51     ` Sean Christopherson
2020-06-25  8:37       ` Borislav Petkov
2020-07-14 12:19     ` Chris Down
2020-07-14 15:47       ` Borislav Petkov
2020-07-14 16:04         ` Chris Down
2020-07-14 16:46           ` Luck, Tony
2020-07-14 16:58             ` Borislav Petkov
2020-07-14 17:02             ` Chris Down
2020-07-14 16:56           ` Borislav Petkov
2020-07-14 17:04             ` Chris Down
2020-07-14 18:52             ` Srinivas Pandruvada
2020-07-15  4:26               ` Borislav Petkov
2020-07-14 19:17           ` Matthew Garrett
2020-11-17 21:00             ` Mathieu Chouquet-Stringer [this message]
2020-11-17 21:20               ` Borislav Petkov
2020-11-18  8:58                 ` Mathieu Chouquet-Stringer
2020-11-18  9:09                 ` Mathieu Chouquet-Stringer
2020-11-18 11:50                   ` Borislav Petkov
2020-11-18 14:04                     ` [PATCH] " Mathieu Chouquet-Stringer
2020-11-18 17:50                       ` Borislav Petkov
2020-11-19 10:53                         ` Mathieu Chouquet-Stringer
2020-11-25 21:41                           ` Mathieu Chouquet-Stringer
2020-11-26 10:03                           ` Borislav Petkov
2020-11-17 21:21               ` [PATCH -v2.1] " Matthew Garrett
2020-11-17 21:22                 ` Matthew Garrett
2020-11-18  9:02                   ` Mathieu Chouquet-Stringer
2020-06-17 15:06 ` [tip: x86/misc] " tip-bot2 for Borislav Petkov
2020-06-25  8:45 ` tip-bot2 for Borislav Petkov

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=20201117210018.GA4247@weirdfishes \
    --to=me@mathieu.digital \
    --cc=bp@alien8.de \
    --cc=chris@chrisdown.name \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@google.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.