Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
09a4d5d0
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
09a4d5d0
编写于
12月 25, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
powerpc: switch to generic old sigaction()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
5aa1cde2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
3 addition
and
75 deletion
+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
未找到文件。
arch/powerpc/Kconfig
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录