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
09a4d5d0
Commit
09a4d5d0
authored
Dec 25, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
powerpc: switch to generic old sigaction()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
5aa1cde2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
75 deletions
+3
-75
arch/powerpc/Kconfig
arch/powerpc/Kconfig
+2
-0
arch/powerpc/include/uapi/asm/signal.h
arch/powerpc/include/uapi/asm/signal.h
+1
-1
arch/powerpc/kernel/ppc32.h
arch/powerpc/kernel/ppc32.h
+0
-9
arch/powerpc/kernel/signal_32.c
arch/powerpc/kernel/signal_32.c
+0
-65
No files found.
arch/powerpc/Kconfig
View file @
09a4d5d0
...
...
@@ -150,6 +150,7 @@ config PPC
select GENERIC_COMPAT_RT_SIGPROCMASK
select GENERIC_COMPAT_RT_SIGPENDING
select OLD_SIGSUSPEND
select OLD_SIGACTION if PPC32
config EARLY_PRINTK
bool
...
...
@@ -160,6 +161,7 @@ config COMPAT
default y if PPC64
select COMPAT_BINFMT_ELF
select ARCH_WANT_OLD_COMPAT_IPC
select COMPAT_OLD_SIGACTION
config SYSVIPC_COMPAT
bool
...
...
arch/powerpc/include/uapi/asm/signal.h
View file @
09a4d5d0
...
...
@@ -90,6 +90,7 @@ typedef struct {
#include <asm-generic/signal-defs.h>
#ifndef __KERNEL__
struct
old_sigaction
{
__sighandler_t
sa_handler
;
old_sigset_t
sa_mask
;
...
...
@@ -97,7 +98,6 @@ struct old_sigaction {
__sigrestore_t
sa_restorer
;
};
#ifndef __KERNEL__
struct
sigaction
{
__sighandler_t
sa_handler
;
unsigned
long
sa_flags
;
...
...
arch/powerpc/kernel/ppc32.h
View file @
09a4d5d0
...
...
@@ -16,15 +16,6 @@
/* These are here to support 32-bit syscalls on a 64-bit kernel. */
#define __old_sigaction32 old_sigaction32
struct
__old_sigaction32
{
compat_uptr_t
sa_handler
;
compat_old_sigset_t
sa_mask
;
unsigned
int
sa_flags
;
compat_uptr_t
sa_restorer
;
/* not used by Linux/SPARC yet */
};
struct
pt_regs32
{
unsigned
int
gpr
[
32
];
unsigned
int
nip
;
...
...
arch/powerpc/kernel/signal_32.c
View file @
09a4d5d0
...
...
@@ -57,7 +57,6 @@
#ifdef CONFIG_PPC64
#define sys_rt_sigreturn compat_sys_rt_sigreturn
#define sys_sigaction compat_sys_sigaction
#define sys_swapcontext compat_sys_swapcontext
#define sys_sigreturn compat_sys_sigreturn
...
...
@@ -130,23 +129,6 @@ static inline int get_sigset_t(sigset_t *set,
return
0
;
}
static
inline
int
get_old_sigaction
(
struct
k_sigaction
*
new_ka
,
struct
old_sigaction
__user
*
act
)
{
compat_old_sigset_t
mask
;
compat_uptr_t
handler
,
restorer
;
if
(
get_user
(
handler
,
&
act
->
sa_handler
)
||
__get_user
(
restorer
,
&
act
->
sa_restorer
)
||
__get_user
(
new_ka
->
sa
.
sa_flags
,
&
act
->
sa_flags
)
||
__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
);
return
0
;
}
#define to_user_ptr(p) ptr_to_compat(p)
#define from_user_ptr(p) compat_ptr(p)
...
...
@@ -196,21 +178,6 @@ static inline int get_sigset_t(sigset_t *set, const sigset_t __user *uset)
return
copy_from_user
(
set
,
uset
,
sizeof
(
*
uset
));
}
static
inline
int
get_old_sigaction
(
struct
k_sigaction
*
new_ka
,
struct
old_sigaction
__user
*
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
);
return
0
;
}
#define to_user_ptr(p) ((unsigned long)(p))
#define from_user_ptr(p) ((void __user *)(p))
...
...
@@ -234,40 +201,8 @@ static inline int restore_general_regs(struct pt_regs *regs,
return
-
EFAULT
;
return
0
;
}
#endif
/* CONFIG_PPC64 */
long
sys_sigaction
(
int
sig
,
struct
old_sigaction
__user
*
act
,
struct
old_sigaction
__user
*
oact
)
{
struct
k_sigaction
new_ka
,
old_ka
;
int
ret
;
#ifdef CONFIG_PPC64
if
(
sig
<
0
)
sig
=
-
sig
;
#endif
if
(
act
)
{
if
(
get_old_sigaction
(
&
new_ka
,
act
))
return
-
EFAULT
;
}
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
(
to_user_ptr
(
old_ka
.
sa
.
sa_handler
),
&
oact
->
sa_handler
)
||
__put_user
(
to_user_ptr
(
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
;
}
/*
* When we have signals to deliver, we set up on the
* user stack, going down from the original stack pointer:
...
...
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