linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linuxfoundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Borislav Petkov <bp@alien8.de>,
	David Woodhouse <dwmw@amazon.co.uk>,
	Dave Hansen <dave.hansen@intel.com>,
	Will Deacon <will.deacon@arm.com>
Subject: Re: [patch V2 1/2] sysfs/cpu: Add vulnerability folder
Date: Mon, 8 Jan 2018 08:33:43 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1801080832040.2094@nanos> (raw)
In-Reply-To: <20180108072930.GB26761@light.dominikbrodowski.net>

On Mon, 8 Jan 2018, Dominik Brodowski wrote:
> On Sun, Jan 07, 2018 at 10:48:00PM +0100, Thomas Gleixner wrote:
> > As the meltdown/spectre problem affects several CPU architectures, it makes
> > sense to have common way to express whether a system is affected by a
> > particular vulnerability or not. If affected the way to express the
> > mitigation should be common as well.
> > 
> > Create /sys/devices/system/cpu/vulnerabilities folder and files for
> > meltdown, spectre_v1 and spectre_v2.
> > 
> > Allow architectures to override the show function.
> > 
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > ---
> >  Documentation/ABI/testing/sysfs-devices-system-cpu |   16 +++++++
> >  drivers/base/Kconfig                               |    3 +
> >  drivers/base/cpu.c                                 |   48 +++++++++++++++++++++
> >  include/linux/cpu.h                                |    7 +++
> >  4 files changed, 74 insertions(+)
> > 
> > --- a/Documentation/ABI/testing/sysfs-devices-system-cpu
> > +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
> > @@ -373,3 +373,19 @@ Contact:	Linux kernel mailing list <linu
> >  Description:	information about CPUs heterogeneity.
> >  
> >  		cpu_capacity: capacity of cpu#.
> > +
> > +What:		/sys/devices/system/cpu/vulnerabilities
> > +		/sys/devices/system/cpu/vulnerabilities/meltdown
> > +		/sys/devices/system/cpu/vulnerabilities/spectre_v1
> > +		/sys/devices/system/cpu/vulnerabilities/spectre_v2
> > +Date:		Januar 2018
> > +Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
> > +Description:	Information about CPU vulnerabilities
> > +
> > +		The files are named after the code names of CPU
> > +		vulnerabilities. The output of those files reflects the
> > +		state of the CPUs in the system.
> 
> Currently, your code sets X86_BUG_SPECTRE_V[12] unconditionally on x86
> CPUs. However, to my understanding some CPUs which do not execute code
> out-of-order aren't affected. As it is better to err on the safe side for
> now, what about adding a disclaimer at the end of this sentence, such as:
> 
> 	", but may contain false positives"

We do that in the same way as we did with BUG_INSECURE (now MELTDOWN). Err
out on the safe side and get the exceptions in place when people are
confident about them. It's not going to take long I assume.

Thanks,

	tglx

  reply	other threads:[~2018-01-08  7:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-07 21:47 [patch V2 0/2] sysfs/cpu: Implement generic vulnerabilites directory Thomas Gleixner
2018-01-07 21:48 ` [patch V2 1/2] sysfs/cpu: Add vulnerability folder Thomas Gleixner
2018-01-07 22:14   ` Konrad Rzeszutek Wilk
2018-01-08  6:53   ` Greg Kroah-Hartman
2018-01-08  7:29   ` Dominik Brodowski
2018-01-08  7:33     ` Thomas Gleixner [this message]
2018-01-08 10:16   ` [tip:x86/pti] " tip-bot for Thomas Gleixner
2018-01-26 16:23   ` [patch V2 1/2] " Andrea Arcangeli
2018-01-26 16:35     ` Greg Kroah-Hartman
2018-01-29  5:30   ` Jon Masters
2018-01-07 21:48 ` [patch V2 2/2] x86/cpu: Implement CPU vulnerabilites sysfs functions Thomas Gleixner
2018-01-07 22:14   ` Konrad Rzeszutek Wilk
2018-01-08  6:54   ` Greg Kroah-Hartman
2018-01-08 10:17   ` [tip:x86/pti] " tip-bot for Thomas Gleixner
2018-01-07 22:22 [patch V2 1/2] sysfs/cpu: Add vulnerability folder Alexey Dobriyan
2018-01-08  3:50 ` Konrad Rzeszutek Wilk
2018-01-08  5:35   ` Alexey Dobriyan
2018-01-08  9:36     ` Thomas Gleixner
2018-01-08 10:30       ` Alexey Dobriyan
2018-01-08 11:54     ` Alan Cox
2018-01-08 18:04       ` Alexey Dobriyan

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=alpine.DEB.2.20.1801080832040.2094@nanos \
    --to=tglx@linutronix.de \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dwmw@amazon.co.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=torvalds@linuxfoundation.org \
    --cc=will.deacon@arm.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;
as well as URLs for NNTP newsgroup(s).