Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752944AbbF3UXh (ORCPT ); Tue, 30 Jun 2015 16:23:37 -0400 Received: from terminus.zytor.com ([198.137.202.10]:47098 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752963AbbF3UW6 (ORCPT ); Tue, 30 Jun 2015 16:22:58 -0400 Message-ID: <5592FA6D.7030308@zytor.com> Date: Tue, 30 Jun 2015 13:22:05 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Ingo Molnar , Borislav Petkov CC: Mike Galbraith , Ingo Molnar , LKML , Thomas Gleixner , Andy Lutomirski , Denys Vlasenko , Oleg Nesterov , Dave Hansen Subject: Re: [all better] Re: regression: massive trouble with fpu rework References: <1435386316.3664.23.camel@gmail.com> <1435393129.3490.7.camel@gmail.com> <20150627082514.GA10894@gmail.com> <1435395328.6545.10.camel@gmail.com> <20150629064008.GA16251@gmail.com> <1435566329.2900.1.camel@gmail.com> <20150629083302.GA13113@pd.tnic> <1435580843.2866.5.camel@gmail.com> <20150629130921.GF12383@pd.tnic> <20150630051654.GB5782@gmail.com> In-Reply-To: <20150630051654.GB5782@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1745 Lines: 45 On 06/29/2015 10:16 PM, Ingo Molnar wrote: > > * Borislav Petkov 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/