summaryrefslogtreecommitdiffstats
path: root/arch/um/sys-x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/sys-x86')
-rw-r--r--arch/um/sys-x86/Makefile2
-rw-r--r--arch/um/sys-x86/shared/sysdep/stub.h9
-rw-r--r--arch/um/sys-x86/shared/sysdep/stub_32.h7
-rw-r--r--arch/um/sys-x86/shared/sysdep/stub_64.h7
-rw-r--r--arch/um/sys-x86/stub_segv.c (renamed from arch/um/sys-x86/stub_segv_64.c)7
-rw-r--r--arch/um/sys-x86/stub_segv_32.c17
6 files changed, 12 insertions, 37 deletions
diff --git a/arch/um/sys-x86/Makefile b/arch/um/sys-x86/Makefile
index 671de0b45dd8..81ab3484a430 100644
--- a/arch/um/sys-x86/Makefile
+++ b/arch/um/sys-x86/Makefile
@@ -10,7 +10,7 @@ endif
obj-y = bug.o bugs_$(BITS).o delay_$(BITS).o fault.o ksyms.o ldt.o \
ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal_$(BITS).o \
- stub_$(BITS).o stub_segv_$(BITS).o syscalls_$(BITS).o \
+ stub_$(BITS).o stub_segv.o syscalls_$(BITS).o \
sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o mem_$(BITS).o
ifeq ($(CONFIG_X86_32),y)
diff --git a/arch/um/sys-x86/shared/sysdep/stub.h b/arch/um/sys-x86/shared/sysdep/stub.h
index 13f523a3fcfa..bd161e300102 100644
--- a/arch/um/sys-x86/shared/sysdep/stub.h
+++ b/arch/um/sys-x86/shared/sysdep/stub.h
@@ -1,5 +1,14 @@
+#include <asm/unistd.h>
+#include <sys/mman.h>
+#include <signal.h>
+#include "as-layout.h"
+#include "stub-data.h"
+
#ifdef __i386__
#include "stub_32.h"
#else
#include "stub_64.h"
#endif
+
+extern void stub_segv_handler(int, siginfo_t *, void *);
+extern void stub_clone_handler(void);
diff --git a/arch/um/sys-x86/shared/sysdep/stub_32.h b/arch/um/sys-x86/shared/sysdep/stub_32.h
index cca14d4ddf52..51fd256c75f0 100644
--- a/arch/um/sys-x86/shared/sysdep/stub_32.h
+++ b/arch/um/sys-x86/shared/sysdep/stub_32.h
@@ -6,14 +6,7 @@
#ifndef __SYSDEP_STUB_H
#define __SYSDEP_STUB_H
-#include <sys/mman.h>
#include <asm/ptrace.h>
-#include <asm/unistd.h>
-#include "as-layout.h"
-#include "stub-data.h"
-
-extern void stub_segv_handler(int sig);
-extern void stub_clone_handler(void);
#define STUB_SYSCALL_RET EAX
#define STUB_MMAP_NR __NR_mmap2
diff --git a/arch/um/sys-x86/shared/sysdep/stub_64.h b/arch/um/sys-x86/shared/sysdep/stub_64.h
index 922a5702c8d8..994df93c5ed3 100644
--- a/arch/um/sys-x86/shared/sysdep/stub_64.h
+++ b/arch/um/sys-x86/shared/sysdep/stub_64.h
@@ -6,14 +6,7 @@
#ifndef __SYSDEP_STUB_H
#define __SYSDEP_STUB_H
-#include <sys/mman.h>
-#include <asm/unistd.h>
#include <sysdep/ptrace_user.h>
-#include "as-layout.h"
-#include "stub-data.h"
-
-extern void stub_segv_handler(int sig);
-extern void stub_clone_handler(void);
#define STUB_SYSCALL_RET PT_INDEX(RAX)
#define STUB_MMAP_NR __NR_mmap
diff --git a/arch/um/sys-x86/stub_segv_64.c b/arch/um/sys-x86/stub_segv.c
index ced051afc705..f62771cf236e 100644
--- a/arch/um/sys-x86/stub_segv_64.c
+++ b/arch/um/sys-x86/stub_segv.c
@@ -3,18 +3,15 @@
* Licensed under the GPL
*/
-#include <signal.h>
-#include "as-layout.h"
#include "sysdep/stub.h"
#include "sysdep/faultinfo.h"
#include "sysdep/sigcontext.h"
void __attribute__ ((__section__ (".__syscall_stub")))
-stub_segv_handler(int sig)
+stub_segv_handler(int sig, siginfo_t *info, void *p)
{
- struct ucontext *uc;
+ struct ucontext *uc = p;
- __asm__ __volatile__("movq %%rdx, %0" : "=g" (uc) :);
GET_FAULTINFO_FROM_SC(*((struct faultinfo *) STUB_DATA),
&uc->uc_mcontext);
trap_myself();
diff --git a/arch/um/sys-x86/stub_segv_32.c b/arch/um/sys-x86/stub_segv_32.c
deleted file mode 100644
index 28ccf737a79f..000000000000
--- a/arch/um/sys-x86/stub_segv_32.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
- * Licensed under the GPL
- */
-
-#include "sysdep/stub.h"
-#include "sysdep/sigcontext.h"
-
-void __attribute__ ((__section__ (".__syscall_stub")))
-stub_segv_handler(int sig)
-{
- struct sigcontext *sc = (struct sigcontext *) (&sig + 1);
-
- GET_FAULTINFO_FROM_SC(*((struct faultinfo *) STUB_DATA), sc);
-
- trap_myself();
-}
OpenPOWER on IntegriCloud