From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752858AbaGLSkp (ORCPT ); Sat, 12 Jul 2014 14:40:45 -0400 Received: from terminus.zytor.com ([198.137.202.10]:49190 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752371AbaGLSkm (ORCPT ); Sat, 12 Jul 2014 14:40:42 -0400 User-Agent: K-9 Mail for Android In-Reply-To: <20140712183748.GW18735@two.firstfloor.org> References: <20140712183748.GW18735@two.firstfloor.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH 2/2] x86_64,signal: Remove 'fs' and 'gs' from sigcontext From: "H. Peter Anvin" Date: Sat, 12 Jul 2014 11:40:03 -0700 To: Andi Kleen , Andy Lutomirski CC: Linus Torvalds , "linux-kernel@vger.kernel.org" , Al Viro , the arch/x86 maintainers Message-ID: <0795204d-575c-40b9-b5b0-75ab14eee330@email.android.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Because you are doing something weird (like Pin, for example) and take an asynchronous fault? On July 12, 2014 11:37:48 AM PDT, Andi Kleen wrote: >> This seems like it's asking for trouble. I think wxe'd have to >> separately save the selectors and the base registers to avoid >breaking >> something, especially once wrgsbase, etc are enabled. > >I agree, it would likely break existing code. > >> Linus, for context, the other patch in this series saves and restores >> SS. > >> Without that, 64-bit sigreturn to a nondefault stack segment is >> basically impossible. > >Why would you ever want to do that? > >-Andi -- Sent from my mobile phone. Please pardon brevity and lack of formatting.