aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/um
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/um')
-rw-r--r--arch/x86/um/Kconfig6
-rw-r--r--arch/x86/um/Makefile4
-rw-r--r--arch/x86/um/fault.c2
-rw-r--r--arch/x86/um/shared/sysdep/syscalls_32.h5
-rw-r--r--arch/x86/um/signal.c15
-rw-r--r--arch/x86/um/sys_call_table_32.c4
-rw-r--r--arch/x86/um/syscalls_32.c38
7 files changed, 8 insertions, 66 deletions
diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig
index 53c90fd412d1..14ef8d1dbc33 100644
--- a/arch/x86/um/Kconfig
+++ b/arch/x86/um/Kconfig
@@ -13,7 +13,6 @@ endmenu
13config UML_X86 13config UML_X86
14 def_bool y 14 def_bool y
15 select GENERIC_FIND_FIRST_BIT 15 select GENERIC_FIND_FIRST_BIT
16 select GENERIC_SIGALTSTACK
17 16
18config 64BIT 17config 64BIT
19 bool "64-bit kernel" if SUBARCH = "x86" 18 bool "64-bit kernel" if SUBARCH = "x86"
@@ -25,6 +24,8 @@ config X86_32
25 select ARCH_WANT_IPC_PARSE_VERSION 24 select ARCH_WANT_IPC_PARSE_VERSION
26 select MODULES_USE_ELF_REL 25 select MODULES_USE_ELF_REL
27 select CLONE_BACKWARDS 26 select CLONE_BACKWARDS
27 select OLD_SIGSUSPEND3
28 select OLD_SIGACTION
28 29
29config X86_64 30config X86_64
30 def_bool 64BIT 31 def_bool 64BIT
@@ -37,9 +38,8 @@ config RWSEM_GENERIC_SPINLOCK
37 def_bool !RWSEM_XCHGADD_ALGORITHM 38 def_bool !RWSEM_XCHGADD_ALGORITHM
38 39
39config 3_LEVEL_PGTABLES 40config 3_LEVEL_PGTABLES
40 bool "Three-level pagetables (EXPERIMENTAL)" if !64BIT 41 bool "Three-level pagetables" if !64BIT
41 default 64BIT 42 default 64BIT
42 depends on EXPERIMENTAL
43 help 43 help
44 Three-level pagetables will let UML have more than 4G of physical 44 Three-level pagetables will let UML have more than 4G of physical
45 memory. All the memory that can't be mapped directly will be treated 45 memory. All the memory that can't be mapped directly will be treated
diff --git a/arch/x86/um/Makefile b/arch/x86/um/Makefile
index 5d065b2222d3..eafa324eb7a5 100644
--- a/arch/x86/um/Makefile
+++ b/arch/x86/um/Makefile
@@ -10,7 +10,7 @@ endif
10 10
11obj-y = bug.o bugs_$(BITS).o delay.o fault.o ksyms.o ldt.o \ 11obj-y = bug.o bugs_$(BITS).o delay.o fault.o ksyms.o ldt.o \
12 ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal.o \ 12 ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal.o \
13 stub_$(BITS).o stub_segv.o syscalls_$(BITS).o \ 13 stub_$(BITS).o stub_segv.o \
14 sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \ 14 sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \
15 mem_$(BITS).o subarch.o os-$(OS)/ 15 mem_$(BITS).o subarch.o os-$(OS)/
16 16
@@ -25,7 +25,7 @@ subarch-$(CONFIG_HIGHMEM) += ../mm/highmem_32.o
25 25
26else 26else
27 27
28obj-y += vdso/ 28obj-y += syscalls_64.o vdso/
29 29
30subarch-y = ../lib/csum-partial_64.o ../lib/memcpy_64.o ../lib/thunk_64.o \ 30subarch-y = ../lib/csum-partial_64.o ../lib/memcpy_64.o ../lib/thunk_64.o \
31 ../lib/rwsem.o 31 ../lib/rwsem.o
diff --git a/arch/x86/um/fault.c b/arch/x86/um/fault.c
index 8784ab30d91b..84ac7f7b0257 100644
--- a/arch/x86/um/fault.c
+++ b/arch/x86/um/fault.c
@@ -20,7 +20,7 @@ int arch_fixup(unsigned long address, struct uml_pt_regs *regs)
20 const struct exception_table_entry *fixup; 20 const struct exception_table_entry *fixup;
21 21
22 fixup = search_exception_tables(address); 22 fixup = search_exception_tables(address);
23 if (fixup != 0) { 23 if (fixup) {
24 UPT_IP(regs) = fixup->fixup; 24 UPT_IP(regs) = fixup->fixup;
25 return 1; 25 return 1;
26 } 26 }
diff --git a/arch/x86/um/shared/sysdep/syscalls_32.h b/arch/x86/um/shared/sysdep/syscalls_32.h
index 8436079be914..68fd2cf526fd 100644
--- a/arch/x86/um/shared/sysdep/syscalls_32.h
+++ b/arch/x86/um/shared/sysdep/syscalls_32.h
@@ -8,11 +8,6 @@
8 8
9typedef long syscall_handler_t(struct pt_regs); 9typedef long syscall_handler_t(struct pt_regs);
10 10
11/* Not declared on x86, incompatible declarations on x86_64, so these have
12 * to go here rather than in sys_call_table.c
13 */
14extern syscall_handler_t sys_rt_sigaction;
15
16extern syscall_handler_t *sys_call_table[]; 11extern syscall_handler_t *sys_call_table[];
17 12
18#define EXECUTE_SYSCALL(syscall, regs) \ 13#define EXECUTE_SYSCALL(syscall, regs) \
diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c
index 71cef48ea5cd..ae7319db18ee 100644
--- a/arch/x86/um/signal.c
+++ b/arch/x86/um/signal.c
@@ -464,7 +464,7 @@ int setup_signal_stack_si(unsigned long stack_top, int sig,
464 return 0; 464 return 0;
465} 465}
466 466
467long sys_sigreturn(struct pt_regs *regs) 467long sys_sigreturn(void)
468{ 468{
469 unsigned long sp = PT_REGS_SP(&current->thread.regs); 469 unsigned long sp = PT_REGS_SP(&current->thread.regs);
470 struct sigframe __user *frame = (struct sigframe __user *)(sp - 8); 470 struct sigframe __user *frame = (struct sigframe __user *)(sp - 8);
@@ -577,7 +577,7 @@ int setup_signal_stack_si(unsigned long stack_top, int sig,
577} 577}
578#endif 578#endif
579 579
580long sys_rt_sigreturn(struct pt_regs *regs) 580long sys_rt_sigreturn(void)
581{ 581{
582 unsigned long sp = PT_REGS_SP(&current->thread.regs); 582 unsigned long sp = PT_REGS_SP(&current->thread.regs);
583 struct rt_sigframe __user *frame = 583 struct rt_sigframe __user *frame =
@@ -601,14 +601,3 @@ long sys_rt_sigreturn(struct pt_regs *regs)
601 force_sig(SIGSEGV, current); 601 force_sig(SIGSEGV, current);
602 return 0; 602 return 0;
603} 603}
604
605#ifdef CONFIG_X86_32
606long ptregs_sigreturn(void)
607{
608 return sys_sigreturn(NULL);
609}
610long ptregs_rt_sigreturn(void)
611{
612 return sys_rt_sigreturn(NULL);
613}
614#endif
diff --git a/arch/x86/um/sys_call_table_32.c b/arch/x86/um/sys_call_table_32.c
index a0c3b0d1a122..531d4269e2e3 100644
--- a/arch/x86/um/sys_call_table_32.c
+++ b/arch/x86/um/sys_call_table_32.c
@@ -24,10 +24,6 @@
24 24
25#define old_mmap sys_old_mmap 25#define old_mmap sys_old_mmap
26 26
27#define ptregs_iopl sys_iopl
28#define ptregs_vm86old sys_vm86old
29#define ptregs_vm86 sys_vm86
30
31#define __SYSCALL_I386(nr, sym, compat) extern asmlinkage void sym(void) ; 27#define __SYSCALL_I386(nr, sym, compat) extern asmlinkage void sym(void) ;
32#include <asm/syscalls_32.h> 28#include <asm/syscalls_32.h>
33 29
diff --git a/arch/x86/um/syscalls_32.c b/arch/x86/um/syscalls_32.c
deleted file mode 100644
index e8bcea99acdb..000000000000
--- a/arch/x86/um/syscalls_32.c
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL
4 */
5
6#include <linux/syscalls.h>
7#include <sysdep/syscalls.h>
8
9long sys_sigaction(int sig, const struct old_sigaction __user *act,
10 struct old_sigaction __user *oact)
11{
12 struct k_sigaction new_ka, old_ka;
13 int ret;
14
15 if (act) {
16 old_sigset_t mask;
17 if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
18 __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
19 __get_user(new_ka.sa.sa_restorer, &act->sa_restorer) ||
20 __get_user(new_ka.sa.sa_flags, &act->sa_flags) ||
21 __get_user(mask, &act->sa_mask))
22 return -EFAULT;
23 siginitset(&new_ka.sa.sa_mask, mask);
24 }
25
26 ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
27
28 if (!ret && oact) {
29 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
30 __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
31 __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer) ||
32 __put_user(old_ka.sa.sa_flags, &oact->sa_flags) ||
33 __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask))
34 return -EFAULT;
35 }
36
37 return ret;
38}