All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Mathieu Chouquet-Stringer <me@mathieu.digital>
Cc: Matthew Garrett <mjg59@google.com>,
	Chris Down <chris@chrisdown.name>,
	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] x86/msr: Filter MSR writes
Date: Wed, 18 Nov 2020 18:50:48 +0100	[thread overview]
Message-ID: <20201118175048.GK7472@zn.tnic> (raw)
In-Reply-To: <20201118140427.GA213447@weirdfishes>

On Wed, Nov 18, 2020 at 03:04:27PM +0100, Mathieu Chouquet-Stringer wrote:
> TAINT_CPU_OUT_OF_SPEC now means what it says. Historically it was for
> SMP kernel oops on an officially SMP incapable processor but now it also
> covers CPUs whose MSRs have been incorrectly poked at. Update
> documentation and script to reflect that.
> 
> Signed-off-by: Mathieu Chouquet-Stringer <me@mathieu.digital>
> ---
>  Documentation/admin-guide/tainted-kernels.rst | 11 ++++++-----
>  tools/debugging/kernel-chktaint               |  2 +-
>  2 files changed, 7 insertions(+), 6 deletions(-)

Please fix the text in Documentation/admin-guide/sysctl/kernel.rst also.

> diff --git a/Documentation/admin-guide/tainted-kernels.rst b/Documentation/admin-guide/tainted-kernels.rst
> index f718a2eaf1f6..95f432c43ba0 100644
> --- a/Documentation/admin-guide/tainted-kernels.rst
> +++ b/Documentation/admin-guide/tainted-kernels.rst
> @@ -84,7 +84,7 @@ Bit  Log  Number  Reason that got the kernel tainted
>  ===  ===  ======  ========================================================
>    0  G/P       1  proprietary module was loaded
>    1  _/F       2  module was force loaded
> -  2  _/S       4  SMP kernel oops on an officially SMP incapable processor
> +  2  _/S       4  kernel running on out of spec processor
>    3  _/R       8  module was force unloaded
>    4  _/M      16  processor reported a Machine Check Exception (MCE)
>    5  _/B      32  bad page referenced or some unexpected page flags
> @@ -116,10 +116,11 @@ More detailed explanation for tainting
>   1)  ``F`` if any module was force loaded by ``insmod -f``, ``' '`` if all
>       modules were loaded normally.
>  
> - 2)  ``S`` if the oops occurred on an SMP kernel running on hardware that
> -     hasn't been certified as safe to run multiprocessor.
> -     Currently this occurs only on various Athlons that are not
> -     SMP capable.
> + 2)  ``S`` if the kernel is running on any processor that is out of
> +     specifications (writing to MSRs will trigger this behavior).

People might wonder what "out of specifications" means. I'd say
something along the lines of "the CPU has been put into a not supported
configuration, therefore proper execution cannot be guaranteed". Grep
the tree for TAINT_CPU_OUT_OF_SPEC to see when this gets set, might give
you a better idea of what to say.

> +     Historically, it could also be if an oops occured on a kernel running on
> +     hardware that hasn't been certified as safe to run multiprocessor, such
> +     as various Athlons that are not SMP capable.

And here you can expand on the examples by saying that poking at random
MSRs from userspace is one possible way to mis-configure it.

>   3)  ``R`` if a module was force unloaded by ``rmmod -f``, ``' '`` if all
>       modules were unloaded normally.
> diff --git a/tools/debugging/kernel-chktaint b/tools/debugging/kernel-chktaint
> index 2240cb56e6e5..0b9d93e27910 100755
> --- a/tools/debugging/kernel-chktaint
> +++ b/tools/debugging/kernel-chktaint
> @@ -72,7 +72,7 @@ if [ `expr $T % 2` -eq 0 ]; then
>  	addout " "
>  else
>  	addout "S"
> -	echo " * SMP kernel oops on an officially SMP incapable processor (#2)"
> +	echo " * kernel running on out of spec processor (#2)"

Yeah, can you think of a better formulation than "out of spec
processor"?

The CPU is fine, only its current configuration is not.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2020-11-18 17:50 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
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 [this message]
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=20201118175048.GK7472@zn.tnic \
    --to=bp@alien8.de \
    --cc=chris@chrisdown.name \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@mathieu.digital \
    --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.