From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752304AbaKKWdY (ORCPT ); Tue, 11 Nov 2014 17:33:24 -0500 Received: from mail.skyhub.de ([78.46.96.112]:48886 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752015AbaKKWdW (ORCPT ); Tue, 11 Nov 2014 17:33:22 -0500 Date: Tue, 11 Nov 2014 23:33:16 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: X86 ML , "linux-kernel@vger.kernel.org" , Peter Zijlstra , Oleg Nesterov , Tony Luck , Andi Kleen Subject: Re: [RFC PATCH] x86, entry: Switch stacks on a paranoid entry from userspace Message-ID: <20141111223316.GQ31490@pd.tnic> References: <20141111213628.GP31490@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 Tue, Nov 11, 2014 at 02:12:18PM -0800, Andy Lutomirski wrote: > I don't see why it would be any more likely for the normal kernel > stack to be corrupted due to a hardware issue that interrupted ring 3 > code than that the IST stack is corrupted. The IST stack is, well, used solely be used for the vectors it is assigned for. Maybe the probabability of it getting bad is a bit lower..., who knows. > I don't know what, if anything, masks and unmasks #MC, but certainly > switching to process context like this patch does will not unmask it. Manuals say to clear MCG_STATUS[MCIP] before you return but you also have to IRET. Because not having cleared MCIP and returning would shut down the machine on another #MC. But then what does it bring me to run on the kernel stack if I'm still in atomic context and I can't take locks? That doesn't help me with the memory_failure() thing. -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. --