From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751259AbbCKJ3n (ORCPT ); Wed, 11 Mar 2015 05:29:43 -0400 Received: from mail.skyhub.de ([78.46.96.112]:57393 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbbCKJ3l (ORCPT ); Wed, 11 Mar 2015 05:29:41 -0400 Date: Wed, 11 Mar 2015 10:28:17 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: Ingo Molnar , Andi Kleen , "H. Peter Anvin" , Al Viro , x86@kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds Subject: Re: [PATCH v2 2/2] x86_64,signal: Remove 'fs' and 'gs' from sigcontext Message-ID: <20150311092817.GB16419@pd.tnic> References: <341cbb62a79e91becc87ac7fab78bc22eb87976e.1425995824.git.luto@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <341cbb62a79e91becc87ac7fab78bc22eb87976e.1425995824.git.luto@amacapital.net> 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, Mar 10, 2015 at 07:03:25AM -0700, Andy Lutomirski wrote: > As far as I can tell, these fields have been set to zero on save and > ignored on restore since Linux was imported into git. Rename them Actually from the very beginning: commit 47f16da277d10ef9494f3e9da2a9113bb22bcd75 Author: Andi Kleen Date: Tue Feb 12 20:17:35 2002 -0800 [PATCH] x86_64 merge: arch + asm ... +static int +setup_sigcontext(struct sigcontext *sc, struct _fpstate *fpstate, + struct pt_regs *regs, unsigned long mask) +{ + int tmp, err = 0; + + tmp = 0; + __asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp)); + err |= __put_user(tmp, (unsigned int *)&sc->gs); + __asm__("movl %%fs,%0" : "=r"(tmp): "0"(tmp)); + err |= __put_user(tmp, (unsigned int *)&sc->fs); > '__pad1' and '__pad2' to avoid confusion and to allow them to be > recycled some day. > > I'm intentionally avoiding calling either of them __pad0: the field > formerly known as __pad0 is now ss. > > Signed-off-by: Andy Lutomirski Acked-by: Borislav Petkov -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --