Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752238AbaFEPz3 (ORCPT ); Thu, 5 Jun 2014 11:55:29 -0400 Received: from mail.skyhub.de ([78.46.96.112]:32873 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751058AbaFEPzZ (ORCPT ); Thu, 5 Jun 2014 11:55:25 -0400 Date: Thu, 5 Jun 2014 17:53:08 +0200 From: Borislav Petkov To: Andy Lutomirski Cc: Matt Fleming , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , Ingo Molnar , Ricardo Neri , "tglx@linutronix.de" , "linux-tip-commits@vger.kernel.org" Subject: Re: [tip:x86/efi] x86/efi: Check for unsafe dealing with FPU state in irq ctxt Message-ID: <20140605155307.GD16642@pd.tnic> References: <538F9AFA.5050806@zytor.com> <20140604224920.GB4126@pd.tnic> <538FB775.8070405@amacapital.net> <20140605071805.GA16647@pd.tnic> <20140605090206.GA16642@pd.tnic> 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, Jun 05, 2014 at 08:44:20AM -0700, Andy Lutomirski wrote: > Are there weird contexts from which EFI calls can happen? It looks > like the current code isn't necessarily safe in things that aren't > normal process context but aren't interrupts either (e.g. debug traps, > #GP, etc). The efi-pstore thing registers as a kmsg dumper which can be run in NMI context and efi can be called there. > I wonder if it would make sense at some point to maintain an explicit > stack of kernel entries. There doesn't seem to be a reliable way to > answer the question of "what context am I in" from C code right now. So that you can ask int ctxt = what_context_Im_in() and then that context can go and change right underneath you. :-) -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. -- -- 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/