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
29fd4480
Commit
29fd4480
authored
Dec 25, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: switch to generic compat rt_sigaction()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
d7c43e4a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
89 deletions
+3
-89
arch/x86/Kconfig
arch/x86/Kconfig
+1
-0
arch/x86/ia32/sys_ia32.c
arch/x86/ia32/sys_ia32.c
+0
-76
arch/x86/include/asm/ia32.h
arch/x86/include/asm/ia32.h
+0
-8
arch/x86/include/asm/sys_ia32.h
arch/x86/include/asm/sys_ia32.h
+0
-3
arch/x86/syscalls/syscall_32.tbl
arch/x86/syscalls/syscall_32.tbl
+1
-1
arch/x86/syscalls/syscall_64.tbl
arch/x86/syscalls/syscall_64.tbl
+1
-1
No files found.
arch/x86/Kconfig
View file @
29fd4480
...
...
@@ -114,6 +114,7 @@ config X86
select MODULES_USE_ELF_RELA if X86_64
select CLONE_BACKWARDS if X86_32
select GENERIC_SIGALTSTACK
select GENERIC_COMPAT_RT_SIGACTION
select GENERIC_COMPAT_RT_SIGQUEUEINFO
select GENERIC_COMPAT_RT_SIGPENDING
select OLD_SIGSUSPEND3 if X86_32 || IA32_EMULATION
...
...
arch/x86/ia32/sys_ia32.c
View file @
29fd4480
...
...
@@ -172,82 +172,6 @@ asmlinkage long sys32_mprotect(unsigned long start, size_t len,
return
sys_mprotect
(
start
,
len
,
prot
);
}
asmlinkage
long
sys32_rt_sigaction
(
int
sig
,
struct
sigaction32
__user
*
act
,
struct
sigaction32
__user
*
oact
,
unsigned
int
sigsetsize
)
{
struct
k_sigaction
new_ka
,
old_ka
;
int
ret
;
compat_sigset_t
set32
;
/* XXX: Don't preclude handling different sized sigset_t's. */
if
(
sigsetsize
!=
sizeof
(
compat_sigset_t
))
return
-
EINVAL
;
if
(
act
)
{
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
)
||
__copy_from_user
(
&
set32
,
&
act
->
sa_mask
,
sizeof
(
compat_sigset_t
)))
return
-
EFAULT
;
new_ka
.
sa
.
sa_handler
=
compat_ptr
(
handler
);
new_ka
.
sa
.
sa_restorer
=
compat_ptr
(
restorer
);
/*
* FIXME: here we rely on _COMPAT_NSIG_WORS to be >=
* than _NSIG_WORDS << 1
*/
switch
(
_NSIG_WORDS
)
{
case
4
:
new_ka
.
sa
.
sa_mask
.
sig
[
3
]
=
set32
.
sig
[
6
]
|
(((
long
)
set32
.
sig
[
7
])
<<
32
);
case
3
:
new_ka
.
sa
.
sa_mask
.
sig
[
2
]
=
set32
.
sig
[
4
]
|
(((
long
)
set32
.
sig
[
5
])
<<
32
);
case
2
:
new_ka
.
sa
.
sa_mask
.
sig
[
1
]
=
set32
.
sig
[
2
]
|
(((
long
)
set32
.
sig
[
3
])
<<
32
);
case
1
:
new_ka
.
sa
.
sa_mask
.
sig
[
0
]
=
set32
.
sig
[
0
]
|
(((
long
)
set32
.
sig
[
1
])
<<
32
);
}
}
ret
=
do_sigaction
(
sig
,
act
?
&
new_ka
:
NULL
,
oact
?
&
old_ka
:
NULL
);
if
(
!
ret
&&
oact
)
{
/*
* FIXME: here we rely on _COMPAT_NSIG_WORS to be >=
* than _NSIG_WORDS << 1
*/
switch
(
_NSIG_WORDS
)
{
case
4
:
set32
.
sig
[
7
]
=
(
old_ka
.
sa
.
sa_mask
.
sig
[
3
]
>>
32
);
set32
.
sig
[
6
]
=
old_ka
.
sa
.
sa_mask
.
sig
[
3
];
case
3
:
set32
.
sig
[
5
]
=
(
old_ka
.
sa
.
sa_mask
.
sig
[
2
]
>>
32
);
set32
.
sig
[
4
]
=
old_ka
.
sa
.
sa_mask
.
sig
[
2
];
case
2
:
set32
.
sig
[
3
]
=
(
old_ka
.
sa
.
sa_mask
.
sig
[
1
]
>>
32
);
set32
.
sig
[
2
]
=
old_ka
.
sa
.
sa_mask
.
sig
[
1
];
case
1
:
set32
.
sig
[
1
]
=
(
old_ka
.
sa
.
sa_mask
.
sig
[
0
]
>>
32
);
set32
.
sig
[
0
]
=
old_ka
.
sa
.
sa_mask
.
sig
[
0
];
}
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
)
||
__copy_to_user
(
&
oact
->
sa_mask
,
&
set32
,
sizeof
(
compat_sigset_t
)))
return
-
EFAULT
;
}
return
ret
;
}
asmlinkage
long
sys32_sigaction
(
int
sig
,
struct
old_sigaction32
__user
*
act
,
struct
old_sigaction32
__user
*
oact
)
{
...
...
arch/x86/include/asm/ia32.h
View file @
29fd4480
...
...
@@ -13,14 +13,6 @@
#include <asm/sigcontext32.h>
/* signal.h */
struct
sigaction32
{
unsigned
int
sa_handler
;
/* Really a pointer, but need to deal
with 32 bits */
unsigned
int
sa_flags
;
unsigned
int
sa_restorer
;
/* Another 32 bit pointer */
compat_sigset_t
sa_mask
;
/* A 32 bit mask */
};
struct
old_sigaction32
{
unsigned
int
sa_handler
;
/* Really a pointer, but need to deal
with 32 bits */
...
...
arch/x86/include/asm/sys_ia32.h
View file @
29fd4480
...
...
@@ -32,10 +32,7 @@ struct mmap_arg_struct32;
asmlinkage
long
sys32_mmap
(
struct
mmap_arg_struct32
__user
*
);
asmlinkage
long
sys32_mprotect
(
unsigned
long
,
size_t
,
unsigned
long
);
struct
sigaction32
;
struct
old_sigaction32
;
asmlinkage
long
sys32_rt_sigaction
(
int
,
struct
sigaction32
__user
*
,
struct
sigaction32
__user
*
,
unsigned
int
);
asmlinkage
long
sys32_sigaction
(
int
,
struct
old_sigaction32
__user
*
,
struct
old_sigaction32
__user
*
);
asmlinkage
long
sys32_alarm
(
unsigned
int
);
...
...
arch/x86/syscalls/syscall_32.tbl
View file @
29fd4480
...
...
@@ -180,7 +180,7 @@
171 i386 getresgid sys_getresgid16
172 i386 prctl sys_prctl
173 i386 rt_sigreturn sys_rt_sigreturn stub32_rt_sigreturn
174 i386 rt_sigaction sys_rt_sigaction
sys32
_rt_sigaction
174 i386 rt_sigaction sys_rt_sigaction
compat_sys
_rt_sigaction
175 i386 rt_sigprocmask sys_rt_sigprocmask
176 i386 rt_sigpending sys_rt_sigpending compat_sys_rt_sigpending
177 i386 rt_sigtimedwait sys_rt_sigtimedwait compat_sys_rt_sigtimedwait
...
...
arch/x86/syscalls/syscall_64.tbl
View file @
29fd4480
...
...
@@ -325,7 +325,7 @@
# x32-specific system call numbers start at 512 to avoid cache impact
# for native 64-bit operation.
#
512 x32 rt_sigaction
sys32
_rt_sigaction
512 x32 rt_sigaction
compat_sys
_rt_sigaction
513 x32 rt_sigreturn stub_x32_rt_sigreturn
514 x32 ioctl compat_sys_ioctl
515 x32 readv compat_sys_readv
...
...
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