Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
5b3eb3ad
Commit
5b3eb3ad
authored
Dec 25, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: switch to generic old sigaction
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
29fd4480
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
6 additions
and
148 deletions
+6
-148
arch/x86/Kconfig
arch/x86/Kconfig
+2
-0
arch/x86/ia32/sys_ia32.c
arch/x86/ia32/sys_ia32.c
+0
-39
arch/x86/include/asm/ia32.h
arch/x86/include/asm/ia32.h
+0
-7
arch/x86/include/asm/signal.h
arch/x86/include/asm/signal.h
+0
-9
arch/x86/include/asm/sys_ia32.h
arch/x86/include/asm/sys_ia32.h
+0
-3
arch/x86/include/asm/syscalls.h
arch/x86/include/asm/syscalls.h
+0
-2
arch/x86/kernel/signal.c
arch/x86/kernel/signal.c
+0
-47
arch/x86/syscalls/syscall_32.tbl
arch/x86/syscalls/syscall_32.tbl
+1
-1
arch/x86/um/Kconfig
arch/x86/um/Kconfig
+1
-0
arch/x86/um/Makefile
arch/x86/um/Makefile
+2
-2
arch/x86/um/syscalls_32.c
arch/x86/um/syscalls_32.c
+0
-38
No files found.
arch/x86/Kconfig
View file @
5b3eb3ad
...
@@ -118,6 +118,8 @@ config X86
...
@@ -118,6 +118,8 @@ config X86
select GENERIC_COMPAT_RT_SIGQUEUEINFO
select GENERIC_COMPAT_RT_SIGQUEUEINFO
select GENERIC_COMPAT_RT_SIGPENDING
select GENERIC_COMPAT_RT_SIGPENDING
select OLD_SIGSUSPEND3 if X86_32 || IA32_EMULATION
select OLD_SIGSUSPEND3 if X86_32 || IA32_EMULATION
select OLD_SIGACTION if X86_32
select COMPAT_OLD_SIGACTION if IA32_EMULATION
config INSTRUCTION_DECODER
config INSTRUCTION_DECODER
def_bool y
def_bool y
...
...
arch/x86/ia32/sys_ia32.c
View file @
5b3eb3ad
...
@@ -172,45 +172,6 @@ asmlinkage long sys32_mprotect(unsigned long start, size_t len,
...
@@ -172,45 +172,6 @@ asmlinkage long sys32_mprotect(unsigned long start, size_t len,
return
sys_mprotect
(
start
,
len
,
prot
);
return
sys_mprotect
(
start
,
len
,
prot
);
}
}
asmlinkage
long
sys32_sigaction
(
int
sig
,
struct
old_sigaction32
__user
*
act
,
struct
old_sigaction32
__user
*
oact
)
{
struct
k_sigaction
new_ka
,
old_ka
;
int
ret
;
if
(
act
)
{
compat_old_sigset_t
mask
;
compat_uptr_t
handler
,
restorer
;
if
(
!
access_ok
(
VERIFY_READ
,
act
,
sizeof
(
*
act
))
||
__get_user
(
handler
,
&
act
->
sa_handler
)
||
__get_user
(
new_ka
.
sa
.
sa_flags
,
&
act
->
sa_flags
)
||
__get_user
(
restorer
,
&
act
->
sa_restorer
)
||
__get_user
(
mask
,
&
act
->
sa_mask
))
return
-
EFAULT
;
new_ka
.
sa
.
sa_handler
=
compat_ptr
(
handler
);
new_ka
.
sa
.
sa_restorer
=
compat_ptr
(
restorer
);
siginitset
(
&
new_ka
.
sa
.
sa_mask
,
mask
);
}
ret
=
do_sigaction
(
sig
,
act
?
&
new_ka
:
NULL
,
oact
?
&
old_ka
:
NULL
);
if
(
!
ret
&&
oact
)
{
if
(
!
access_ok
(
VERIFY_WRITE
,
oact
,
sizeof
(
*
oact
))
||
__put_user
(
ptr_to_compat
(
old_ka
.
sa
.
sa_handler
),
&
oact
->
sa_handler
)
||
__put_user
(
ptr_to_compat
(
old_ka
.
sa
.
sa_restorer
),
&
oact
->
sa_restorer
)
||
__put_user
(
old_ka
.
sa
.
sa_flags
,
&
oact
->
sa_flags
)
||
__put_user
(
old_ka
.
sa
.
sa_mask
.
sig
[
0
],
&
oact
->
sa_mask
))
return
-
EFAULT
;
}
return
ret
;
}
asmlinkage
long
sys32_waitpid
(
compat_pid_t
pid
,
unsigned
int
__user
*
stat_addr
,
asmlinkage
long
sys32_waitpid
(
compat_pid_t
pid
,
unsigned
int
__user
*
stat_addr
,
int
options
)
int
options
)
{
{
...
...
arch/x86/include/asm/ia32.h
View file @
5b3eb3ad
...
@@ -13,13 +13,6 @@
...
@@ -13,13 +13,6 @@
#include <asm/sigcontext32.h>
#include <asm/sigcontext32.h>
/* signal.h */
/* signal.h */
struct
old_sigaction32
{
unsigned
int
sa_handler
;
/* Really a pointer, but need to deal
with 32 bits */
compat_old_sigset_t
sa_mask
;
/* A 32 bit mask */
unsigned
int
sa_flags
;
unsigned
int
sa_restorer
;
/* Another 32 bit pointer */
};
struct
ucontext_ia32
{
struct
ucontext_ia32
{
unsigned
int
uc_flags
;
unsigned
int
uc_flags
;
...
...
arch/x86/include/asm/signal.h
View file @
5b3eb3ad
...
@@ -34,15 +34,6 @@ extern void do_notify_resume(struct pt_regs *, void *, __u32);
...
@@ -34,15 +34,6 @@ extern void do_notify_resume(struct pt_regs *, void *, __u32);
#define __ARCH_HAS_SA_RESTORER
#define __ARCH_HAS_SA_RESTORER
#ifdef __i386__
struct
old_sigaction
{
__sighandler_t
sa_handler
;
old_sigset_t
sa_mask
;
unsigned
long
sa_flags
;
__sigrestore_t
sa_restorer
;
};
#endif
/* !__i386__ */
#include <asm/sigcontext.h>
#include <asm/sigcontext.h>
#ifdef __i386__
#ifdef __i386__
...
...
arch/x86/include/asm/sys_ia32.h
View file @
5b3eb3ad
...
@@ -32,9 +32,6 @@ struct mmap_arg_struct32;
...
@@ -32,9 +32,6 @@ struct mmap_arg_struct32;
asmlinkage
long
sys32_mmap
(
struct
mmap_arg_struct32
__user
*
);
asmlinkage
long
sys32_mmap
(
struct
mmap_arg_struct32
__user
*
);
asmlinkage
long
sys32_mprotect
(
unsigned
long
,
size_t
,
unsigned
long
);
asmlinkage
long
sys32_mprotect
(
unsigned
long
,
size_t
,
unsigned
long
);
struct
old_sigaction32
;
asmlinkage
long
sys32_sigaction
(
int
,
struct
old_sigaction32
__user
*
,
struct
old_sigaction32
__user
*
);
asmlinkage
long
sys32_alarm
(
unsigned
int
);
asmlinkage
long
sys32_alarm
(
unsigned
int
);
asmlinkage
long
sys32_waitpid
(
compat_pid_t
,
unsigned
int
__user
*
,
int
);
asmlinkage
long
sys32_waitpid
(
compat_pid_t
,
unsigned
int
__user
*
,
int
);
...
...
arch/x86/include/asm/syscalls.h
View file @
5b3eb3ad
...
@@ -34,8 +34,6 @@ asmlinkage int sys_get_thread_area(struct user_desc __user *);
...
@@ -34,8 +34,6 @@ asmlinkage int sys_get_thread_area(struct user_desc __user *);
#ifdef CONFIG_X86_32
#ifdef CONFIG_X86_32
/* kernel/signal.c */
/* kernel/signal.c */
asmlinkage
int
sys_sigaction
(
int
,
const
struct
old_sigaction
__user
*
,
struct
old_sigaction
__user
*
);
unsigned
long
sys_sigreturn
(
void
);
unsigned
long
sys_sigreturn
(
void
);
/* kernel/vm86_32.c */
/* kernel/vm86_32.c */
...
...
arch/x86/kernel/signal.c
View file @
5b3eb3ad
...
@@ -535,53 +535,6 @@ static int x32_setup_rt_frame(int sig, struct k_sigaction *ka,
...
@@ -535,53 +535,6 @@ static int x32_setup_rt_frame(int sig, struct k_sigaction *ka,
return
0
;
return
0
;
}
}
#ifdef CONFIG_X86_32
asmlinkage
int
sys_sigaction
(
int
sig
,
const
struct
old_sigaction
__user
*
act
,
struct
old_sigaction
__user
*
oact
)
{
struct
k_sigaction
new_ka
,
old_ka
;
int
ret
=
0
;
if
(
act
)
{
old_sigset_t
mask
;
if
(
!
access_ok
(
VERIFY_READ
,
act
,
sizeof
(
*
act
)))
return
-
EFAULT
;
get_user_try
{
get_user_ex
(
new_ka
.
sa
.
sa_handler
,
&
act
->
sa_handler
);
get_user_ex
(
new_ka
.
sa
.
sa_flags
,
&
act
->
sa_flags
);
get_user_ex
(
mask
,
&
act
->
sa_mask
);
get_user_ex
(
new_ka
.
sa
.
sa_restorer
,
&
act
->
sa_restorer
);
}
get_user_catch
(
ret
);
if
(
ret
)
return
-
EFAULT
;
siginitset
(
&
new_ka
.
sa
.
sa_mask
,
mask
);
}
ret
=
do_sigaction
(
sig
,
act
?
&
new_ka
:
NULL
,
oact
?
&
old_ka
:
NULL
);
if
(
!
ret
&&
oact
)
{
if
(
!
access_ok
(
VERIFY_WRITE
,
oact
,
sizeof
(
*
oact
)))
return
-
EFAULT
;
put_user_try
{
put_user_ex
(
old_ka
.
sa
.
sa_handler
,
&
oact
->
sa_handler
);
put_user_ex
(
old_ka
.
sa
.
sa_flags
,
&
oact
->
sa_flags
);
put_user_ex
(
old_ka
.
sa
.
sa_mask
.
sig
[
0
],
&
oact
->
sa_mask
);
put_user_ex
(
old_ka
.
sa
.
sa_restorer
,
&
oact
->
sa_restorer
);
}
put_user_catch
(
ret
);
if
(
ret
)
return
-
EFAULT
;
}
return
ret
;
}
#endif
/* CONFIG_X86_32 */
/*
/*
* Do a signal return; undo the signal stack.
* Do a signal return; undo the signal stack.
*/
*/
...
...
arch/x86/syscalls/syscall_32.tbl
View file @
5b3eb3ad
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
64 i386 getppid sys_getppid
64 i386 getppid sys_getppid
65 i386 getpgrp sys_getpgrp
65 i386 getpgrp sys_getpgrp
66 i386 setsid sys_setsid
66 i386 setsid sys_setsid
67 i386 sigaction sys_sigaction
sys32
_sigaction
67 i386 sigaction sys_sigaction
compat_sys
_sigaction
68 i386 sgetmask sys_sgetmask
68 i386 sgetmask sys_sgetmask
69 i386 ssetmask sys_ssetmask
69 i386 ssetmask sys_ssetmask
70 i386 setreuid sys_setreuid16
70 i386 setreuid sys_setreuid16
...
...
arch/x86/um/Kconfig
View file @
5b3eb3ad
...
@@ -26,6 +26,7 @@ config X86_32
...
@@ -26,6 +26,7 @@ config X86_32
select MODULES_USE_ELF_REL
select MODULES_USE_ELF_REL
select CLONE_BACKWARDS
select CLONE_BACKWARDS
select OLD_SIGSUSPEND3
select OLD_SIGSUSPEND3
select OLD_SIGACTION
config X86_64
config X86_64
def_bool 64BIT
def_bool 64BIT
...
...
arch/x86/um/Makefile
View file @
5b3eb3ad
...
@@ -10,7 +10,7 @@ endif
...
@@ -10,7 +10,7 @@ endif
obj-y
=
bug.o bugs_
$(BITS)
.o delay.o fault.o ksyms.o ldt.o
\
obj-y
=
bug.o bugs_
$(BITS)
.o delay.o fault.o ksyms.o ldt.o
\
ptrace_
$(BITS)
.o ptrace_user.o setjmp_
$(BITS)
.o signal.o
\
ptrace_
$(BITS)
.o ptrace_user.o setjmp_
$(BITS)
.o signal.o
\
stub_
$(BITS)
.o stub_segv.o
syscalls_
$(BITS)
.o
\
stub_
$(BITS)
.o stub_segv.o
\
sys_call_table_
$(BITS)
.o sysrq_
$(BITS)
.o tls_
$(BITS)
.o
\
sys_call_table_
$(BITS)
.o sysrq_
$(BITS)
.o tls_
$(BITS)
.o
\
mem_
$(BITS)
.o subarch.o os-
$(OS)
/
mem_
$(BITS)
.o subarch.o os-
$(OS)
/
...
@@ -25,7 +25,7 @@ subarch-$(CONFIG_HIGHMEM) += ../mm/highmem_32.o
...
@@ -25,7 +25,7 @@ subarch-$(CONFIG_HIGHMEM) += ../mm/highmem_32.o
else
else
obj-y
+=
vdso/
obj-y
+=
syscalls_64.o
vdso/
subarch-y
=
../lib/csum-partial_64.o ../lib/memcpy_64.o ../lib/thunk_64.o
\
subarch-y
=
../lib/csum-partial_64.o ../lib/memcpy_64.o ../lib/thunk_64.o
\
../lib/rwsem.o
../lib/rwsem.o
...
...
arch/x86/um/syscalls_32.c
deleted
100644 → 0
View file @
29fd4480
/*
* Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com)
* Licensed under the GPL
*/
#include <linux/syscalls.h>
#include <sysdep/syscalls.h>
long
sys_sigaction
(
int
sig
,
const
struct
old_sigaction
__user
*
act
,
struct
old_sigaction
__user
*
oact
)
{
struct
k_sigaction
new_ka
,
old_ka
;
int
ret
;
if
(
act
)
{
old_sigset_t
mask
;
if
(
!
access_ok
(
VERIFY_READ
,
act
,
sizeof
(
*
act
))
||
__get_user
(
new_ka
.
sa
.
sa_handler
,
&
act
->
sa_handler
)
||
__get_user
(
new_ka
.
sa
.
sa_restorer
,
&
act
->
sa_restorer
)
||
__get_user
(
new_ka
.
sa
.
sa_flags
,
&
act
->
sa_flags
)
||
__get_user
(
mask
,
&
act
->
sa_mask
))
return
-
EFAULT
;
siginitset
(
&
new_ka
.
sa
.
sa_mask
,
mask
);
}
ret
=
do_sigaction
(
sig
,
act
?
&
new_ka
:
NULL
,
oact
?
&
old_ka
:
NULL
);
if
(
!
ret
&&
oact
)
{
if
(
!
access_ok
(
VERIFY_WRITE
,
oact
,
sizeof
(
*
oact
))
||
__put_user
(
old_ka
.
sa
.
sa_handler
,
&
oact
->
sa_handler
)
||
__put_user
(
old_ka
.
sa
.
sa_restorer
,
&
oact
->
sa_restorer
)
||
__put_user
(
old_ka
.
sa
.
sa_flags
,
&
oact
->
sa_flags
)
||
__put_user
(
old_ka
.
sa
.
sa_mask
.
sig
[
0
],
&
oact
->
sa_mask
))
return
-
EFAULT
;
}
return
ret
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment