Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
7a6cf932
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
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看板
提交
7a6cf932
编写于
11月 19, 2012
作者:
C
Catalin Marinas
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'execve' into upstream
* execve: arm64: get rid of fork/vfork/clone wrappers
上级
908816df
5653cde7
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
25 addition
and
52 deletion
+25
-52
arch/arm64/include/asm/syscalls.h
arch/arm64/include/asm/syscalls.h
+6
-5
arch/arm64/include/asm/unistd32.h
arch/arm64/include/asm/unistd32.h
+3
-3
arch/arm64/kernel/entry.S
arch/arm64/kernel/entry.S
+0
-5
arch/arm64/kernel/process.c
arch/arm64/kernel/process.c
+8
-2
arch/arm64/kernel/sys.c
arch/arm64/kernel/sys.c
+3
-8
arch/arm64/kernel/sys32.S
arch/arm64/kernel/sys32.S
+0
-14
arch/arm64/kernel/sys_compat.c
arch/arm64/kernel/sys_compat.c
+5
-15
未找到文件。
arch/arm64/include/asm/syscalls.h
浏览文件 @
7a6cf932
...
@@ -23,15 +23,16 @@
...
@@ -23,15 +23,16 @@
/*
/*
* System call wrappers implemented in kernel/entry.S.
* System call wrappers implemented in kernel/entry.S.
*/
*/
asmlinkage
long
sys_clone_wrapper
(
unsigned
long
clone_flags
,
unsigned
long
newsp
,
void
__user
*
parent_tid
,
unsigned
long
tls_val
,
void
__user
*
child_tid
);
asmlinkage
long
sys_rt_sigreturn_wrapper
(
void
);
asmlinkage
long
sys_rt_sigreturn_wrapper
(
void
);
asmlinkage
long
sys_sigaltstack_wrapper
(
const
stack_t
__user
*
uss
,
asmlinkage
long
sys_sigaltstack_wrapper
(
const
stack_t
__user
*
uss
,
stack_t
__user
*
uoss
);
stack_t
__user
*
uoss
);
/*
* AArch64 sys_clone implementation has a different prototype than the generic
* one (additional TLS value argument).
*/
#define sys_clone sys_clone
#include <asm-generic/syscalls.h>
#include <asm-generic/syscalls.h>
#endif
/* __ASM_SYSCALLS_H */
#endif
/* __ASM_SYSCALLS_H */
arch/arm64/include/asm/unistd32.h
浏览文件 @
7a6cf932
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
__SYSCALL
(
0
,
sys_restart_syscall
)
__SYSCALL
(
0
,
sys_restart_syscall
)
__SYSCALL
(
1
,
sys_exit
)
__SYSCALL
(
1
,
sys_exit
)
__SYSCALL
(
2
,
compat_sys_fork
_wrapper
)
__SYSCALL
(
2
,
compat_sys_fork
)
__SYSCALL
(
3
,
sys_read
)
__SYSCALL
(
3
,
sys_read
)
__SYSCALL
(
4
,
sys_write
)
__SYSCALL
(
4
,
sys_write
)
__SYSCALL
(
5
,
compat_sys_open
)
__SYSCALL
(
5
,
compat_sys_open
)
...
@@ -141,7 +141,7 @@ __SYSCALL(116, compat_sys_sysinfo)
...
@@ -141,7 +141,7 @@ __SYSCALL(116, compat_sys_sysinfo)
__SYSCALL
(
117
,
sys_ni_syscall
)
/* 117 was sys_ipc */
__SYSCALL
(
117
,
sys_ni_syscall
)
/* 117 was sys_ipc */
__SYSCALL
(
118
,
sys_fsync
)
__SYSCALL
(
118
,
sys_fsync
)
__SYSCALL
(
119
,
compat_sys_sigreturn_wrapper
)
__SYSCALL
(
119
,
compat_sys_sigreturn_wrapper
)
__SYSCALL
(
120
,
compat_sys_clone_wrapper
)
__SYSCALL
(
120
,
sys_clone
)
__SYSCALL
(
121
,
sys_setdomainname
)
__SYSCALL
(
121
,
sys_setdomainname
)
__SYSCALL
(
122
,
sys_newuname
)
__SYSCALL
(
122
,
sys_newuname
)
__SYSCALL
(
123
,
sys_ni_syscall
)
/* 123 was sys_modify_ldt */
__SYSCALL
(
123
,
sys_ni_syscall
)
/* 123 was sys_modify_ldt */
...
@@ -211,7 +211,7 @@ __SYSCALL(186, compat_sys_sigaltstack_wrapper)
...
@@ -211,7 +211,7 @@ __SYSCALL(186, compat_sys_sigaltstack_wrapper)
__SYSCALL
(
187
,
compat_sys_sendfile
)
__SYSCALL
(
187
,
compat_sys_sendfile
)
__SYSCALL
(
188
,
sys_ni_syscall
)
/* 188 reserved */
__SYSCALL
(
188
,
sys_ni_syscall
)
/* 188 reserved */
__SYSCALL
(
189
,
sys_ni_syscall
)
/* 189 reserved */
__SYSCALL
(
189
,
sys_ni_syscall
)
/* 189 reserved */
__SYSCALL
(
190
,
compat_sys_vfork
_wrapper
)
__SYSCALL
(
190
,
compat_sys_vfork
)
__SYSCALL
(
191
,
compat_sys_getrlimit
)
/* SuS compliant getrlimit */
__SYSCALL
(
191
,
compat_sys_getrlimit
)
/* SuS compliant getrlimit */
__SYSCALL
(
192
,
sys_mmap_pgoff
)
__SYSCALL
(
192
,
sys_mmap_pgoff
)
__SYSCALL
(
193
,
compat_sys_truncate64_wrapper
)
__SYSCALL
(
193
,
compat_sys_truncate64_wrapper
)
...
...
arch/arm64/kernel/entry.S
浏览文件 @
7a6cf932
...
@@ -676,11 +676,6 @@ __sys_trace_return:
...
@@ -676,11 +676,6 @@ __sys_trace_return:
/*
/*
*
Special
system
call
wrappers
.
*
Special
system
call
wrappers
.
*/
*/
ENTRY
(
sys_clone_wrapper
)
mov
x5
,
sp
b
sys_clone
ENDPROC
(
sys_clone_wrapper
)
ENTRY
(
sys_rt_sigreturn_wrapper
)
ENTRY
(
sys_rt_sigreturn_wrapper
)
mov
x0
,
sp
mov
x0
,
sp
b
sys_rt_sigreturn
b
sys_rt_sigreturn
...
...
arch/arm64/kernel/process.c
浏览文件 @
7a6cf932
...
@@ -246,14 +246,20 @@ int copy_thread(unsigned long clone_flags, unsigned long stack_start,
...
@@ -246,14 +246,20 @@ int copy_thread(unsigned long clone_flags, unsigned long stack_start,
*
childregs
=
*
regs
;
*
childregs
=
*
regs
;
childregs
->
regs
[
0
]
=
0
;
childregs
->
regs
[
0
]
=
0
;
if
(
is_compat_thread
(
task_thread_info
(
p
)))
{
if
(
is_compat_thread
(
task_thread_info
(
p
)))
{
childregs
->
compat_sp
=
stack_start
;
if
(
stack_start
)
childregs
->
compat_sp
=
stack_start
;
}
else
{
}
else
{
/*
/*
* Read the current TLS pointer from tpidr_el0 as it may be
* Read the current TLS pointer from tpidr_el0 as it may be
* out-of-sync with the saved value.
* out-of-sync with the saved value.
*/
*/
asm
(
"mrs %0, tpidr_el0"
:
"=r"
(
tls
));
asm
(
"mrs %0, tpidr_el0"
:
"=r"
(
tls
));
childregs
->
sp
=
stack_start
;
if
(
stack_start
)
{
/* 16-byte aligned stack mandatory on AArch64 */
if
(
stack_start
&
15
)
return
-
EINVAL
;
childregs
->
sp
=
stack_start
;
}
}
}
/*
/*
* If a TLS pointer was passed to clone (4th argument), use it
* If a TLS pointer was passed to clone (4th argument), use it
...
...
arch/arm64/kernel/sys.c
浏览文件 @
7a6cf932
...
@@ -31,14 +31,10 @@
...
@@ -31,14 +31,10 @@
*/
*/
asmlinkage
long
sys_clone
(
unsigned
long
clone_flags
,
unsigned
long
newsp
,
asmlinkage
long
sys_clone
(
unsigned
long
clone_flags
,
unsigned
long
newsp
,
int
__user
*
parent_tidptr
,
unsigned
long
tls_val
,
int
__user
*
parent_tidptr
,
unsigned
long
tls_val
,
int
__user
*
child_tidptr
,
struct
pt_regs
*
regs
)
int
__user
*
child_tidptr
)
{
{
if
(
!
newsp
)
return
do_fork
(
clone_flags
,
newsp
,
current_pt_regs
(),
0
,
newsp
=
regs
->
sp
;
parent_tidptr
,
child_tidptr
);
/* 16-byte aligned stack mandatory on AArch64 */
if
(
newsp
&
15
)
return
-
EINVAL
;
return
do_fork
(
clone_flags
,
newsp
,
regs
,
0
,
parent_tidptr
,
child_tidptr
);
}
}
asmlinkage
long
sys_mmap
(
unsigned
long
addr
,
unsigned
long
len
,
asmlinkage
long
sys_mmap
(
unsigned
long
addr
,
unsigned
long
len
,
...
@@ -54,7 +50,6 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
...
@@ -54,7 +50,6 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
/*
/*
* Wrappers to pass the pt_regs argument.
* Wrappers to pass the pt_regs argument.
*/
*/
#define sys_clone sys_clone_wrapper
#define sys_rt_sigreturn sys_rt_sigreturn_wrapper
#define sys_rt_sigreturn sys_rt_sigreturn_wrapper
#define sys_sigaltstack sys_sigaltstack_wrapper
#define sys_sigaltstack sys_sigaltstack_wrapper
...
...
arch/arm64/kernel/sys32.S
浏览文件 @
7a6cf932
...
@@ -26,20 +26,6 @@
...
@@ -26,20 +26,6 @@
/*
/*
*
System
call
wrappers
for
the
AArch32
compatibility
layer
.
*
System
call
wrappers
for
the
AArch32
compatibility
layer
.
*/
*/
compat_sys_fork_wrapper
:
mov
x0
,
sp
b
compat_sys_fork
ENDPROC
(
compat_sys_fork_wrapper
)
compat_sys_vfork_wrapper
:
mov
x0
,
sp
b
compat_sys_vfork
ENDPROC
(
compat_sys_vfork_wrapper
)
compat_sys_clone_wrapper
:
mov
x5
,
sp
b
compat_sys_clone
ENDPROC
(
compat_sys_clone_wrapper
)
compat_sys_sigreturn_wrapper
:
compat_sys_sigreturn_wrapper
:
mov
x0
,
sp
mov
x0
,
sp
...
...
arch/arm64/kernel/sys_compat.c
浏览文件 @
7a6cf932
...
@@ -28,25 +28,15 @@
...
@@ -28,25 +28,15 @@
#include <asm/cacheflush.h>
#include <asm/cacheflush.h>
#include <asm/unistd32.h>
#include <asm/unistd32.h>
asmlinkage
int
compat_sys_fork
(
struct
pt_regs
*
regs
)
asmlinkage
int
compat_sys_fork
(
void
)
{
{
return
do_fork
(
SIGCHLD
,
regs
->
compat_sp
,
regs
,
0
,
NULL
,
NULL
);
return
do_fork
(
SIGCHLD
,
0
,
current_pt_regs
()
,
0
,
NULL
,
NULL
);
}
}
asmlinkage
int
compat_sys_clone
(
unsigned
long
clone_flags
,
unsigned
long
newsp
,
asmlinkage
int
compat_sys_vfork
(
void
)
int
__user
*
parent_tidptr
,
int
tls_val
,
int
__user
*
child_tidptr
,
struct
pt_regs
*
regs
)
{
{
if
(
!
newsp
)
return
do_fork
(
CLONE_VFORK
|
CLONE_VM
|
SIGCHLD
,
0
,
newsp
=
regs
->
compat_sp
;
current_pt_regs
(),
0
,
NULL
,
NULL
);
return
do_fork
(
clone_flags
,
newsp
,
regs
,
0
,
parent_tidptr
,
child_tidptr
);
}
asmlinkage
int
compat_sys_vfork
(
struct
pt_regs
*
regs
)
{
return
do_fork
(
CLONE_VFORK
|
CLONE_VM
|
SIGCHLD
,
regs
->
compat_sp
,
regs
,
0
,
NULL
,
NULL
);
}
}
asmlinkage
int
compat_sys_sched_rr_get_interval
(
compat_pid_t
pid
,
asmlinkage
int
compat_sys_sched_rr_get_interval
(
compat_pid_t
pid
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录