linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, viro@zeniv.linux.org.uk,
	vgupta@synopsys.com, catalin.marinas@arm.com,
	will.deacon@arm.com, hskinnemoen@gmail.com, egtvedt@samfundet.no,
	vapier@gentoo.org, msalter@redhat.com, a-jacquiot@ti.com,
	starvik@axis.com, jesper.nilsson@axis.com, dhowells@redhat.com,
	rkuo@codeaurora.org, tony.luck@intel.com, fenghua.yu@intel.com,
	takata@linux-m32r.org, geert@linux-m68k.org,
	james.hogan@imgtec.com, monstr@monstr.eu,
	yasutake.koichi@jp.panasonic.com, ralf@linux-mips.org,
	jonas@southpole.se, jejb@parisc-linux.org, deller@gmx.de,
	benh@kernel.crashing.org, paulus@samba.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	liqin.linux@gmail.com, lennox.wu@gmail.com, cmetcalf@tilera.com,
	gxt@mprc.pku.edu.cn, linux-xtensa@linux-xtensa.org,
	akpm@linux-foundation.org, oleg@redhat.com, tj@kernel.org,
	hch@infradead.org, Richard Weinberger <richard@nod.at>
Subject: [PATCH 43/44] um/x86: Use translate_signal()
Date: Mon,  3 Mar 2014 01:00:43 +0100	[thread overview]
Message-ID: <1393804844-8008-9-git-send-email-richard@nod.at> (raw)
In-Reply-To: <1393804844-8008-1-git-send-email-richard@nod.at>

Use the common helper instead of it's own variant.

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 arch/x86/um/signal.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c
index 79d8245..1ffafa1 100644
--- a/arch/x86/um/signal.c
+++ b/arch/x86/um/signal.c
@@ -5,7 +5,6 @@
  */
 
 
-#include <linux/personality.h>
 #include <linux/ptrace.h>
 #include <linux/kernel.h>
 #include <asm/unistd.h>
@@ -504,7 +503,7 @@ int setup_signal_stack_si(unsigned long stack_top, struct ksignal *ksig,
 			  struct pt_regs *regs, sigset_t *set)
 {
 	struct rt_sigframe __user *frame;
-	int err = 0, sig = ksig->sig;
+	int err = 0;
 
 	frame = (struct rt_sigframe __user *)
 		round_down(stack_top - sizeof(struct rt_sigframe), 16);
@@ -550,14 +549,8 @@ int setup_signal_stack_si(unsigned long stack_top, struct ksignal *ksig,
 		return err;
 
 	/* Set up registers for signal handler */
-	{
-		struct exec_domain *ed = current_thread_info()->exec_domain;
-		if (unlikely(ed && ed->signal_invmap && sig < 32))
-			sig = ed->signal_invmap[sig];
-	}
-
 	PT_REGS_SP(regs) = (unsigned long) frame;
-	PT_REGS_DI(regs) = sig;
+	PT_REGS_DI(regs) = translate_signal(ksig->sig);
 	/* In case the signal handler was declared without prototypes */
 	PT_REGS_AX(regs) = 0;
 
-- 
1.8.4.2

  parent reply	other threads:[~2014-03-03  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03  0:00 [PATCH 35/44] m68k: Use translate_signal() Richard Weinberger
2014-03-03  0:00 ` [PATCH 36/44] microblaze: " Richard Weinberger
2014-03-03  0:00 ` [PATCH 37/44] mn10300: " Richard Weinberger
2014-03-03  0:00   ` Richard Weinberger
2014-03-03  0:00 ` [PATCH 38/44] s390: " Richard Weinberger
2014-03-03  0:00   ` Richard Weinberger
2014-03-03  0:00 ` [PATCH 39/44] sh: " Richard Weinberger
2014-03-03  0:00   ` Richard Weinberger
2014-03-03  0:00 ` [PATCH 40/44] tile: " Richard Weinberger
2014-03-03  0:00   ` Richard Weinberger
2014-03-03  0:00 ` [PATCH 41/44] unicore32: " Richard Weinberger
2014-03-03  0:00   ` Richard Weinberger
2014-03-03  0:00 ` [PATCH 42/44] x86: " Richard Weinberger
2014-03-03  0:00   ` Richard Weinberger
2014-03-03  0:00 ` Richard Weinberger [this message]
2014-03-03  0:00   ` [PATCH 43/44] um/x86: " Richard Weinberger
2014-03-03  0:00 ` [PATCH 44/44] xtensa: " Richard Weinberger
2014-03-03  0:00   ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393804844-8008-9-git-send-email-richard@nod.at \
    --to=richard@nod.at \
    --cc=a-jacquiot@ti.com \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=catalin.marinas@arm.com \
    --cc=cmetcalf@tilera.com \
    --cc=deller@gmx.de \
    --cc=dhowells@redhat.com \
    --cc=egtvedt@samfundet.no \
    --cc=fenghua.yu@intel.com \
    --cc=geert@linux-m68k.org \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=hch@infradead.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hskinnemoen@gmail.com \
    --cc=james.hogan@imgtec.com \
    --cc=jejb@parisc-linux.org \
    --cc=jesper.nilsson@axis.com \
    --cc=jonas@southpole.se \
    --cc=lennox.wu@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=liqin.linux@gmail.com \
    --cc=monstr@monstr.eu \
    --cc=msalter@redhat.com \
    --cc=oleg@redhat.com \
    --cc=paulus@samba.org \
    --cc=ralf@linux-mips.org \
    --cc=rkuo@codeaurora.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=starvik@axis.com \
    --cc=takata@linux-m32r.org \
    --cc=tj@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=vapier@gentoo.org \
    --cc=vgupta@synopsys.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=will.deacon@arm.com \
    --cc=yasutake.koichi@jp.panasonic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).