From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753283AbaEUXwJ (ORCPT ); Wed, 21 May 2014 19:52:09 -0400 Received: from mail.skyhub.de ([78.46.96.112]:49893 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbaEUXwH (ORCPT ); Wed, 21 May 2014 19:52:07 -0400 Date: Thu, 22 May 2014 01:51:43 +0200 From: Borislav Petkov To: Linus Torvalds Cc: "Luck, Tony" , Andy Lutomirski , Jiri Kosina , Thomas Gleixner , Steven Rostedt , Andi Kleen , "linux-kernel@vger.kernel.org" , "H. Peter Anvin" , Ingo Molnar Subject: Re: [RFC] x86_64: A real proposal for iret-less return to kernel Message-ID: <20140521235143.GC21575@pd.tnic> References: <3908561D78D1C84285E8C5FCA982C28F3281189E@ORSMSX114.amr.corp.intel.com> <3908561D78D1C84285E8C5FCA982C28F3281198D@ORSMSX114.amr.corp.intel.com> <20140521224816.GP25130@pd.tnic> <3908561D78D1C84285E8C5FCA982C28F32811B92@ORSMSX114.amr.corp.intel.com> <3908561D78D1C84285E8C5FCA982C28F32811C5F@ORSMSX114.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 22, 2014 at 08:30:33AM +0900, Linus Torvalds wrote: > If the OS then decides to take down the whole machine, the OS - not > the hardware - can choose to do something that will punch through > other CPU's NMI blocking (notably, init/reset), but the hardware doing > this on its own is just broken if true. Not that it is any consolation but MCE is not broadcast on AMD. Regardless, exceptions like MCE cannot be held pending and do pierce the NMI handler on both. Now, if the NMI handler experiences a non-broadcast MCE on the same CPU, while running, we're simply going to panic as we're in kernel space anyway. The only problem is if the NMI handler gets interrupted while running on a bystander CPU. And I think we could deal with this because the bystander would not see an MCE and will return safely. We just need to make sure that it returns back to the said NMI handler and not to userspace. Unless I'm missing something ... Oh yeah, fun :-\ -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. --