Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
951b3961
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
951b3961
编写于
10月 21, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
c6x: sanitize copy_thread(), get rid of clone(2) wrapper, switch to generic clone()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
24465a40
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
36 deletion
+6
-36
arch/c6x/include/asm/syscalls.h
arch/c6x/include/asm/syscalls.h
+0
-4
arch/c6x/include/uapi/asm/unistd.h
arch/c6x/include/uapi/asm/unistd.h
+1
-0
arch/c6x/kernel/entry.S
arch/c6x/kernel/entry.S
+0
-12
arch/c6x/kernel/process.c
arch/c6x/kernel/process.c
+5
-20
未找到文件。
arch/c6x/include/asm/syscalls.h
浏览文件 @
951b3961
...
...
@@ -41,10 +41,6 @@ extern long sys_fallocate_c6x(int fd, int mode,
u32
len_lo
,
u32
len_hi
);
extern
int
sys_cache_sync
(
unsigned
long
s
,
unsigned
long
e
);
struct
pt_regs
;
extern
asmlinkage
long
sys_c6x_clone
(
struct
pt_regs
*
regs
);
#include <asm-generic/syscalls.h>
#endif
/* __ASM_C6X_SYSCALLS_H */
arch/c6x/include/uapi/asm/unistd.h
浏览文件 @
951b3961
...
...
@@ -15,6 +15,7 @@
*/
#define __ARCH_WANT_SYS_EXECVE
#define __ARCH_WANT_SYS_CLONE
/* Use the standard ABI for syscalls. */
#include <asm-generic/unistd.h>
...
...
arch/c6x/kernel/entry.S
浏览文件 @
951b3961
...
...
@@ -613,18 +613,6 @@ ENDPROC(sys_sigaltstack)
;; Special system calls
;; return address is in B3
;;
ENTRY
(
sys_clone
)
ADD
.
D1X
SP
,
8
,
A4
#ifdef CONFIG_C6X_BIG_KERNEL
|
|
MVKL
.
S1
sys_c6x_clone
,
A0
MVKH
.
S1
sys_c6x_clone
,
A0
BNOP
.
S2X
A0
,
5
#else
|
|
B
.
S2
sys_c6x_clone
NOP
5
#endif
ENDPROC
(
sys_clone
)
ENTRY
(
sys_rt_sigreturn
)
ADD
.
D1X
SP
,
8
,
A4
#ifdef CONFIG_C6X_BIG_KERNEL
...
...
arch/c6x/kernel/process.c
浏览文件 @
951b3961
...
...
@@ -112,22 +112,6 @@ void exit_thread(void)
{
}
SYSCALL_DEFINE1
(
c6x_clone
,
struct
pt_regs
*
,
regs
)
{
unsigned
long
clone_flags
;
unsigned
long
newsp
;
/* syscall puts clone_flags in A4 and usp in B4 */
clone_flags
=
regs
->
orig_a4
;
if
(
regs
->
b4
)
newsp
=
regs
->
b4
;
else
newsp
=
regs
->
sp
;
return
do_fork
(
clone_flags
,
newsp
,
regs
,
0
,
(
int
__user
*
)
regs
->
a6
,
(
int
__user
*
)
regs
->
b6
);
}
/*
* Do necessary setup to start up a newly executed thread.
*/
...
...
@@ -155,13 +139,13 @@ void start_thread(struct pt_regs *regs, unsigned int pc, unsigned long usp)
*/
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
ustk_size
,
struct
task_struct
*
p
,
struct
pt_regs
*
regs
)
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
{
struct
pt_regs
*
childregs
;
childregs
=
task_pt_regs
(
p
);
if
(
!
regs
)
{
if
(
unlikely
(
p
->
flags
&
PF_KTHREAD
)
)
{
/* case of __kernel_thread: we return to supervisor space */
memset
(
childregs
,
0
,
sizeof
(
struct
pt_regs
));
childregs
->
sp
=
(
unsigned
long
)(
childregs
+
1
);
...
...
@@ -170,8 +154,9 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
childregs
->
a1
=
ustk_size
;
/* argument */
}
else
{
/* Otherwise use the given stack */
*
childregs
=
*
regs
;
childregs
->
sp
=
usp
;
*
childregs
=
*
current_pt_regs
();
if
(
usp
)
childregs
->
sp
=
usp
;
p
->
thread
.
pc
=
(
unsigned
long
)
ret_from_fork
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录