Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752016AbbDEFJy (ORCPT ); Sun, 5 Apr 2015 01:09:54 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:35589 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751336AbbDEFJx (ORCPT ); Sun, 5 Apr 2015 01:09:53 -0400 Date: Sun, 5 Apr 2015 07:09:47 +0200 From: Ingo Molnar To: Brian Gerst Cc: "H. Peter Anvin" , Andy Lutomirski , Denys Vlasenko , Linus Torvalds , Borislav Petkov , the arch/x86 maintainers , Linux Kernel Mailing List Subject: Re: [PATCH] x86/signal: Remove pax argument from restore_sigcontext Message-ID: <20150405050947.GA26464@gmail.com> References: <1428152303-17154-1-git-send-email-brgerst@gmail.com> <20150404141434.GC22756@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Content-Length: 2678 Lines: 69 * Brian Gerst wrote: > On Sat, Apr 4, 2015 at 10:14 AM, Ingo Molnar wrote: > > > > * Brian Gerst wrote: > > > >> The pax argument is unnecesary. Instead, store the RAX value directly > >> in regs. > >> > >> Signed-off-by: Brian Gerst > >> Cc: Ingo Molnar > >> Cc: "H. Peter Anvin" > >> Cc: Andy Lutomirski > >> Cc: Denys Vlasenko > >> Cc: Linus Torvalds > >> Cc: Borislav Petkov > >> Cc: x86@kernel.org > >> Cc: linux-kernel@vger.kernel.org > >> --- > >> arch/x86/ia32/ia32_signal.c | 17 ++++++----------- > >> arch/x86/include/asm/sighandling.h | 4 +--- > >> arch/x86/kernel/signal.c | 22 ++++++++-------------- > >> 3 files changed, 15 insertions(+), 28 deletions(-) > >> > >> diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c > >> index 1f5e2b0..c81d35e6 100644 > >> --- a/arch/x86/ia32/ia32_signal.c > >> +++ b/arch/x86/ia32/ia32_signal.c > >> @@ -161,8 +161,7 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) > >> } > >> > >> static int ia32_restore_sigcontext(struct pt_regs *regs, > >> - struct sigcontext_ia32 __user *sc, > >> - unsigned int *pax) > >> + struct sigcontext_ia32 __user *sc) > >> { > >> unsigned int tmpflags, err = 0; > >> void __user *buf; > >> @@ -184,7 +183,7 @@ static int ia32_restore_sigcontext(struct pt_regs *regs, > >> RELOAD_SEG(es); > >> > >> COPY(di); COPY(si); COPY(bp); COPY(sp); COPY(bx); > >> - COPY(dx); COPY(cx); COPY(ip); > >> + COPY(dx); COPY(cx); COPY(ip); COPY(ax); > >> /* Don't touch extended registers */ > >> > >> COPY_SEG_CPL3(cs); > >> @@ -197,8 +196,6 @@ static int ia32_restore_sigcontext(struct pt_regs *regs, > >> > >> get_user_ex(tmp, &sc->fpstate); > >> buf = compat_ptr(tmp); > >> - > >> - get_user_ex(*pax, &sc->ax); > >> } get_user_catch(err); > > > > Note that arch/x86/kernel/signal.c appears to have a similar pattern - > > and there it could be removed as well? > > I'm guessing you didn't read the whole patch, because I did change it. Yes :-/ Ingo -- 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/