Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
9fff2fa0
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看板
提交
9fff2fa0
编写于
10月 10, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
arm: switch to saner kernel_execve() semantics
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
22e2430d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
29 deletion
+7
-29
arch/arm/Kconfig
arch/arm/Kconfig
+1
-0
arch/arm/include/asm/unistd.h
arch/arm/include/asm/unistd.h
+0
-1
arch/arm/kernel/entry-common.S
arch/arm/kernel/entry-common.S
+4
-25
arch/arm/kernel/process.c
arch/arm/kernel/process.c
+2
-3
未找到文件。
arch/arm/Kconfig
浏览文件 @
9fff2fa0
...
...
@@ -50,6 +50,7 @@ config ARM
select GENERIC_STRNLEN_USER
select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN
select GENERIC_KERNEL_THREAD
select GENERIC_KERNEL_EXECVE
help
The ARM series is a line of low-power-consumption RISC chip designs
licensed by ARM Ltd and targeted at embedded applications and
...
...
arch/arm/include/asm/unistd.h
浏览文件 @
9fff2fa0
...
...
@@ -470,7 +470,6 @@
#define __ARCH_WANT_SYS_SOCKETCALL
#endif
#define __ARCH_WANT_SYS_EXECVE
#define __ARCH_WANT_KERNEL_EXECVE
/*
* "Conditional" syscalls
...
...
arch/arm/kernel/entry-common.S
浏览文件 @
9fff2fa0
...
...
@@ -86,35 +86,14 @@ ENDPROC(ret_to_user)
*/
ENTRY
(
ret_from_fork
)
bl
schedule_tail
cmp
r5
,
#
0
movne
r0
,
r4
movne
lr
,
pc
movne
pc
,
r5
get_thread_info
tsk
mov
why
,
#
1
b
ret_slow_syscall
ENDPROC
(
ret_from_fork
)
ENTRY
(
ret_from_kernel_thread
)
UNWIND
(.
fnstart
)
UNWIND
(.
cantunwind
)
bl
schedule_tail
mov
r0
,
r4
adr
lr
,
BSYM
(
1
f
)
@
kernel
threads
should
not
exit
mov
pc
,
r5
1
:
bl
do_exit
nop
UNWIND
(.
fnend
)
ENDPROC
(
ret_from_kernel_thread
)
/*
*
turn
a
kernel
thread
into
userland
process
*
use
:
ret_from_kernel_execve
(
struct
pt_regs
*
normal
)
*/
ENTRY
(
ret_from_kernel_execve
)
mov
why
,
#
0
@
not
a
syscall
str
why
,
[
r0
,
#
S_R0
]
@
...
and
we
want
0
in
->
ARM_r0
as
well
get_thread_info
tsk
@
thread
structure
mov
sp
,
r0
@
stack
pointer
just
under
pt_regs
b
ret_slow_syscall
ENDPROC
(
ret_from_kernel_execve
)
.
equ
NR_syscalls
,
0
#define CALL(x) .equ NR_syscalls,NR_syscalls+1
#include "calls.S"
...
...
arch/arm/kernel/process.c
浏览文件 @
9fff2fa0
...
...
@@ -373,7 +373,6 @@ void release_thread(struct task_struct *dead_task)
}
asmlinkage
void
ret_from_fork
(
void
)
__asm__
(
"ret_from_fork"
);
asmlinkage
void
ret_from_kernel_thread
(
void
)
__asm__
(
"ret_from_kernel_thread"
);
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
stack_start
,
...
...
@@ -388,13 +387,13 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start,
*
childregs
=
*
regs
;
childregs
->
ARM_r0
=
0
;
childregs
->
ARM_sp
=
stack_start
;
thread
->
cpu_context
.
pc
=
(
unsigned
long
)
ret_from_fork
;
}
else
{
memset
(
childregs
,
0
,
sizeof
(
struct
pt_regs
));
thread
->
cpu_context
.
r4
=
stk_sz
;
thread
->
cpu_context
.
r5
=
stack_start
;
thread
->
cpu_context
.
pc
=
(
unsigned
long
)
ret_from_kernel_thread
;
childregs
->
ARM_cpsr
=
SVC_MODE
;
}
thread
->
cpu_context
.
pc
=
(
unsigned
long
)
ret_from_fork
;
thread
->
cpu_context
.
sp
=
(
unsigned
long
)
childregs
;
clear_ptrace_hw_breakpoint
(
p
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录