Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
207bdae4
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看板
提交
207bdae4
编写于
12月 23, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
arm64: switch to generic sigaltstack
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
0aa0203f
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
6 addition
and
80 deletion
+6
-80
arch/arm64/Kconfig
arch/arm64/Kconfig
+1
-0
arch/arm64/include/asm/syscalls.h
arch/arm64/include/asm/syscalls.h
+0
-2
arch/arm64/include/asm/unistd32.h
arch/arm64/include/asm/unistd32.h
+1
-1
arch/arm64/kernel/entry.S
arch/arm64/kernel/entry.S
+0
-5
arch/arm64/kernel/signal.c
arch/arm64/kernel/signal.c
+2
-15
arch/arm64/kernel/signal32.c
arch/arm64/kernel/signal32.c
+2
-51
arch/arm64/kernel/sys.c
arch/arm64/kernel/sys.c
+0
-1
arch/arm64/kernel/sys32.S
arch/arm64/kernel/sys32.S
+0
-5
未找到文件。
arch/arm64/Kconfig
浏览文件 @
207bdae4
...
...
@@ -10,6 +10,7 @@ config ARM64
select GENERIC_IOMAP
select GENERIC_IRQ_PROBE
select GENERIC_IRQ_SHOW
select GENERIC_SIGALTSTACK
select GENERIC_SMP_IDLE_THREAD
select GENERIC_TIME_VSYSCALL
select HARDIRQS_SW_RESEND
...
...
arch/arm64/include/asm/syscalls.h
浏览文件 @
207bdae4
...
...
@@ -24,8 +24,6 @@
* System call wrappers implemented in kernel/entry.S.
*/
asmlinkage
long
sys_rt_sigreturn_wrapper
(
void
);
asmlinkage
long
sys_sigaltstack_wrapper
(
const
stack_t
__user
*
uss
,
stack_t
__user
*
uoss
);
#include <asm-generic/syscalls.h>
...
...
arch/arm64/include/asm/unistd32.h
浏览文件 @
207bdae4
...
...
@@ -207,7 +207,7 @@ __SYSCALL(182, sys_chown16)
__SYSCALL
(
183
,
sys_getcwd
)
__SYSCALL
(
184
,
sys_capget
)
__SYSCALL
(
185
,
sys_capset
)
__SYSCALL
(
186
,
compat_sys_sigaltstack
_wrapper
)
__SYSCALL
(
186
,
compat_sys_sigaltstack
)
__SYSCALL
(
187
,
compat_sys_sendfile
)
__SYSCALL
(
188
,
sys_ni_syscall
)
/* 188 reserved */
__SYSCALL
(
189
,
sys_ni_syscall
)
/* 189 reserved */
...
...
arch/arm64/kernel/entry.S
浏览文件 @
207bdae4
...
...
@@ -677,10 +677,5 @@ ENTRY(sys_rt_sigreturn_wrapper)
b
sys_rt_sigreturn
ENDPROC
(
sys_rt_sigreturn_wrapper
)
ENTRY
(
sys_sigaltstack_wrapper
)
ldr
x2
,
[
sp
,
#
S_SP
]
b
sys_sigaltstack
ENDPROC
(
sys_sigaltstack_wrapper
)
ENTRY
(
handle_arch_irq
)
.
quad
0
arch/arm64/kernel/signal.c
浏览文件 @
207bdae4
...
...
@@ -149,8 +149,7 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
if
(
restore_sigframe
(
regs
,
frame
))
goto
badframe
;
if
(
do_sigaltstack
(
&
frame
->
uc
.
uc_stack
,
NULL
,
regs
->
sp
)
==
-
EFAULT
)
if
(
restore_altstack
(
&
frame
->
uc
.
uc_stack
))
goto
badframe
;
return
regs
->
regs
[
0
];
...
...
@@ -164,12 +163,6 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
return
0
;
}
asmlinkage
long
sys_sigaltstack
(
const
stack_t
__user
*
uss
,
stack_t
__user
*
uoss
,
unsigned
long
sp
)
{
return
do_sigaltstack
(
uss
,
uoss
,
sp
);
}
static
int
setup_sigframe
(
struct
rt_sigframe
__user
*
sf
,
struct
pt_regs
*
regs
,
sigset_t
*
set
)
{
...
...
@@ -250,7 +243,6 @@ static int setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
sigset_t
*
set
,
struct
pt_regs
*
regs
)
{
struct
rt_sigframe
__user
*
frame
;
stack_t
stack
;
int
err
=
0
;
frame
=
get_sigframe
(
ka
,
regs
);
...
...
@@ -260,12 +252,7 @@ static int setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
__put_user_error
(
0
,
&
frame
->
uc
.
uc_flags
,
err
);
__put_user_error
(
NULL
,
&
frame
->
uc
.
uc_link
,
err
);
memset
(
&
stack
,
0
,
sizeof
(
stack
));
stack
.
ss_sp
=
(
void
__user
*
)
current
->
sas_ss_sp
;
stack
.
ss_flags
=
sas_ss_flags
(
regs
->
sp
);
stack
.
ss_size
=
current
->
sas_ss_size
;
err
|=
__copy_to_user
(
&
frame
->
uc
.
uc_stack
,
&
stack
,
sizeof
(
stack
));
err
|=
__save_altstack
(
&
frame
->
uc
.
uc_stack
,
regs
->
sp
);
err
|=
setup_sigframe
(
frame
,
regs
,
set
);
if
(
err
==
0
)
{
setup_return
(
regs
,
ka
,
frame
,
usig
);
...
...
arch/arm64/kernel/signal32.c
浏览文件 @
207bdae4
...
...
@@ -42,12 +42,6 @@ struct compat_old_sigaction {
compat_uptr_t
sa_restorer
;
};
typedef
struct
compat_sigaltstack
{
compat_uptr_t
ss_sp
;
int
ss_flags
;
compat_size_t
ss_size
;
}
compat_stack_t
;
struct
compat_sigcontext
{
/* We always set these two fields to 0 */
compat_ulong_t
trap_no
;
...
...
@@ -423,43 +417,6 @@ asmlinkage int compat_sys_rt_sigaction(int sig,
return
ret
;
}
int
compat_do_sigaltstack
(
compat_uptr_t
compat_uss
,
compat_uptr_t
compat_uoss
,
compat_ulong_t
sp
)
{
compat_stack_t
__user
*
newstack
=
compat_ptr
(
compat_uss
);
compat_stack_t
__user
*
oldstack
=
compat_ptr
(
compat_uoss
);
compat_uptr_t
ss_sp
;
int
ret
;
mm_segment_t
old_fs
;
stack_t
uss
,
uoss
;
/* Marshall the compat new stack into a stack_t */
if
(
newstack
)
{
if
(
get_user
(
ss_sp
,
&
newstack
->
ss_sp
)
||
__get_user
(
uss
.
ss_flags
,
&
newstack
->
ss_flags
)
||
__get_user
(
uss
.
ss_size
,
&
newstack
->
ss_size
))
return
-
EFAULT
;
uss
.
ss_sp
=
compat_ptr
(
ss_sp
);
}
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
/* The __user pointer casts are valid because of the set_fs() */
ret
=
do_sigaltstack
(
newstack
?
(
stack_t
__user
*
)
&
uss
:
NULL
,
oldstack
?
(
stack_t
__user
*
)
&
uoss
:
NULL
,
(
unsigned
long
)
sp
);
set_fs
(
old_fs
);
/* Convert the old stack_t into a compat stack. */
if
(
!
ret
&&
oldstack
&&
(
put_user
(
ptr_to_compat
(
uoss
.
ss_sp
),
&
oldstack
->
ss_sp
)
||
__put_user
(
uoss
.
ss_flags
,
&
oldstack
->
ss_flags
)
||
__put_user
(
uoss
.
ss_size
,
&
oldstack
->
ss_size
)))
return
-
EFAULT
;
return
ret
;
}
static
int
compat_restore_sigframe
(
struct
pt_regs
*
regs
,
struct
compat_sigframe
__user
*
sf
)
{
...
...
@@ -562,9 +519,7 @@ asmlinkage int compat_sys_rt_sigreturn(struct pt_regs *regs)
if
(
compat_restore_sigframe
(
regs
,
&
frame
->
sig
))
goto
badframe
;
if
(
compat_do_sigaltstack
(
ptr_to_compat
(
&
frame
->
sig
.
uc
.
uc_stack
),
ptr_to_compat
((
void
__user
*
)
NULL
),
regs
->
compat_sp
)
==
-
EFAULT
)
if
(
compat_restore_altstack
(
&
frame
->
sig
.
uc
.
uc_stack
))
goto
badframe
;
return
regs
->
regs
[
0
];
...
...
@@ -705,11 +660,7 @@ int compat_setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
__put_user_error
(
0
,
&
frame
->
sig
.
uc
.
uc_flags
,
err
);
__put_user_error
(
NULL
,
&
frame
->
sig
.
uc
.
uc_link
,
err
);
memset
(
&
stack
,
0
,
sizeof
(
stack
));
stack
.
ss_sp
=
(
compat_uptr_t
)
current
->
sas_ss_sp
;
stack
.
ss_flags
=
sas_ss_flags
(
regs
->
compat_sp
);
stack
.
ss_size
=
current
->
sas_ss_size
;
err
|=
__copy_to_user
(
&
frame
->
sig
.
uc
.
uc_stack
,
&
stack
,
sizeof
(
stack
));
err
|=
__compat_save_altstack
(
&
frame
->
sig
.
uc
.
uc_stack
,
regs
->
compat_sp
);
err
|=
compat_setup_sigframe
(
&
frame
->
sig
,
regs
,
set
);
...
...
arch/arm64/kernel/sys.c
浏览文件 @
207bdae4
...
...
@@ -40,7 +40,6 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
* Wrappers to pass the pt_regs argument.
*/
#define sys_rt_sigreturn sys_rt_sigreturn_wrapper
#define sys_sigaltstack sys_sigaltstack_wrapper
#include <asm/syscalls.h>
...
...
arch/arm64/kernel/sys32.S
浏览文件 @
207bdae4
...
...
@@ -39,11 +39,6 @@ compat_sys_rt_sigreturn_wrapper:
b
compat_sys_rt_sigreturn
ENDPROC
(
compat_sys_rt_sigreturn_wrapper
)
compat_sys_sigaltstack_wrapper
:
ldr
x2
,
[
sp
,
#
S_COMPAT_SP
]
b
compat_do_sigaltstack
ENDPROC
(
compat_sys_sigaltstack_wrapper
)
compat_sys_statfs64_wrapper
:
mov
w3
,
#
84
cmp
w1
,
#
88
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录