public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>
Cc: Mike Galbraith <umgwanakikbuti@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andy Lutomirski <luto@kernel.org>,
	Denys Vlasenko <dvlasenk@redhat.com>,
	Oleg Nesterov <oleg@redhat.com>, Dave Hansen <dave@sr71.net>
Subject: Re: [all better] Re: regression: massive trouble with fpu rework
Date: Tue, 30 Jun 2015 13:22:05 -0700	[thread overview]
Message-ID: <5592FA6D.7030308@zytor.com> (raw)
In-Reply-To: <20150630051654.GB5782@gmail.com>

On 06/29/2015 10:16 PM, Ingo Molnar wrote:
> 
> * Borislav Petkov <bp@alien8.de> wrote:
> 
>> On Mon, Jun 29, 2015 at 02:27:23PM +0200, Mike Galbraith wrote:
>>> With it commented out, and fpu__init_system() either back at previously
>>> booting position [5] or at original [0], doesn't matter, box is dead,
>>> but differently.  It stalls after setting clocksource to tsc, and just
>>> sits there.
>>
>> ... which means that unmasking the CPUID features is absolutely needed
>> on Linux. Not unmasking probably triggers this original bug which
>>
>>   066941bd4eeb ("x86: unmask CPUID levels on Intel CPUs")
>>
>> fixed.
> 
> Yes.
> 
> And I'd consider us hanging a separate (but not high prio) bug: the kernel should 
> be robust as long as the CPUID data is stable. In that sense the original fix is 
> right (we really want to unmask all available CPUID leaves), but it also masked 
> another (less severe) kernel bug.
> 
> For example virtualization is known to tweak CPUID details creatively, and 
> firmware (as this example shows it) can mess it up a well, so we generally want to 
> treat it as untrusted input data that needs to be validated.
> 

Well, that is not *entirely* possible, since if the data is just plain
wrong, we're screwed no matter what.

However, we could deal with CPUID level capping.  The best way to do
that is probably to have a table of CPU features and the minimum
required CPUID level for each.  If maximum CPUID level < that level,
disable that feature.

	-hpa



  reply	other threads:[~2015-06-30 20:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-27  6:25 regression: massive trouble with fpu rework Mike Galbraith
2015-06-27  8:18 ` [all better] " Mike Galbraith
2015-06-27  8:25   ` Ingo Molnar
2015-06-27  8:55     ` Mike Galbraith
2015-06-27  9:37       ` Borislav Petkov
2015-06-27 11:01         ` Mike Galbraith
2015-06-27 21:02       ` Henrique de Moraes Holschuh
2015-06-28  3:11         ` Mike Galbraith
2015-06-28 15:06           ` Henrique de Moraes Holschuh
2015-06-28 15:39             ` Mike Galbraith
2015-06-29  1:12               ` Henrique de Moraes Holschuh
2015-06-29  6:40       ` Ingo Molnar
2015-06-29  8:25         ` Mike Galbraith
2015-06-29  8:33           ` Borislav Petkov
2015-06-29  8:41             ` Mike Galbraith
2015-06-29  9:35             ` Ingo Molnar
2015-06-29  9:57               ` Borislav Petkov
2015-06-29 19:48               ` H. Peter Anvin
2015-06-30  5:14                 ` Ingo Molnar
2015-06-29 12:27             ` Mike Galbraith
2015-06-29 13:09               ` Borislav Petkov
2015-06-30  5:16                 ` Ingo Molnar
2015-06-30 20:22                   ` H. Peter Anvin [this message]
2015-07-09 13:13                   ` Henrique de Moraes Holschuh
2015-06-29 19:50         ` H. Peter Anvin
2015-06-30  5:18           ` Ingo Molnar
2015-06-30  5:24     ` [tip:x86/urgent] x86/fpu: Fix FPU related boot regression when CPUID masking BIOS feature is enabled tip-bot for Ingo Molnar
2015-06-27  8:18 ` regression: massive trouble with fpu rework Ingo Molnar

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=5592FA6D.7030308@zytor.com \
    --to=hpa@zytor.com \
    --cc=bp@alien8.de \
    --cc=dave@sr71.net \
    --cc=dvlasenk@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=umgwanakikbuti@gmail.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