Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
e80d6661
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e80d6661
编写于
10月 22, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
flagday: kill pt_regs argument of do_fork()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
18c26c27
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
19 addition
and
26 deletion
+19
-26
arch/blackfin/kernel/process.c
arch/blackfin/kernel/process.c
+1
-1
arch/ia64/kernel/entry.S
arch/ia64/kernel/entry.S
+6
-8
arch/m68k/kernel/process.c
arch/m68k/kernel/process.c
+1
-1
arch/mips/kernel/linux32.c
arch/mips/kernel/linux32.c
+1
-1
arch/mips/kernel/syscall.c
arch/mips/kernel/syscall.c
+2
-2
arch/sparc/kernel/process_32.c
arch/sparc/kernel/process_32.c
+1
-2
arch/sparc/kernel/process_64.c
arch/sparc/kernel/process_64.c
+1
-2
include/linux/sched.h
include/linux/sched.h
+1
-1
kernel/fork.c
kernel/fork.c
+5
-8
未找到文件。
arch/blackfin/kernel/process.c
浏览文件 @
e80d6661
...
...
@@ -135,7 +135,7 @@ asmlinkage int bfin_clone(unsigned long clone_flags, unsigned long newsp)
#endif
if
(
newsp
)
newsp
-=
12
;
return
do_fork
(
clone_flags
,
newsp
,
regs
,
0
,
NULL
,
NULL
);
return
do_fork
(
clone_flags
,
newsp
,
0
,
NULL
,
NULL
);
}
int
...
...
arch/ia64/kernel/entry.S
浏览文件 @
e80d6661
...
...
@@ -116,13 +116,12 @@ GLOBAL_ENTRY(sys_clone2)
mov
loc1
=
r16
//
save
ar
.
pfs
across
do_fork
.
body
mov
out1
=
in1
mov
out
3
=
in2
mov
out
2
=
in2
tbit.nz
p6
,
p0
=
in0
,
CLONE_SETTLS_BIT
mov
out
4
=
in3
//
parent_tidptr
:
valid
only
w
/
CLONE_PARENT_SETTID
mov
out
3
=
in3
//
parent_tidptr
:
valid
only
w
/
CLONE_PARENT_SETTID
;;
(
p6
)
st8
[
r2
]=
in5
//
store
TLS
in
r16
for
copy_thread
()
mov
out5
=
in4
//
child_tidptr
:
valid
only
w
/
CLONE_CHILD_SETTID
or
CLONE_CHILD_CLEARTID
adds
out2
=
IA64_SWITCH_STACK_SIZE
+
16
,
sp
//
out2
=
&
regs
mov
out4
=
in4
//
child_tidptr
:
valid
only
w
/
CLONE_CHILD_SETTID
or
CLONE_CHILD_CLEARTID
mov
out0
=
in0
//
out0
=
clone_flags
br.call.sptk.many
rp
=
do_fork
.
ret1
:
.
restore
sp
...
...
@@ -148,13 +147,12 @@ GLOBAL_ENTRY(sys_clone)
mov
loc1
=
r16
//
save
ar
.
pfs
across
do_fork
.
body
mov
out1
=
in1
mov
out
3
=
16
//
stacksize
(
compensates
for
16
-
byte
scratch
area
)
mov
out
2
=
16
//
stacksize
(
compensates
for
16
-
byte
scratch
area
)
tbit.nz
p6
,
p0
=
in0
,
CLONE_SETTLS_BIT
mov
out
4
=
in2
//
parent_tidptr
:
valid
only
w
/
CLONE_PARENT_SETTID
mov
out
3
=
in2
//
parent_tidptr
:
valid
only
w
/
CLONE_PARENT_SETTID
;;
(
p6
)
st8
[
r2
]=
in4
//
store
TLS
in
r13
(
tp
)
mov
out5
=
in3
//
child_tidptr
:
valid
only
w
/
CLONE_CHILD_SETTID
or
CLONE_CHILD_CLEARTID
adds
out2
=
IA64_SWITCH_STACK_SIZE
+
16
,
sp
//
out2
=
&
regs
mov
out4
=
in3
//
child_tidptr
:
valid
only
w
/
CLONE_CHILD_SETTID
or
CLONE_CHILD_CLEARTID
mov
out0
=
in0
//
out0
=
clone_flags
br.call.sptk.many
rp
=
do_fork
.
ret2
:
.
restore
sp
...
...
arch/m68k/kernel/process.c
浏览文件 @
e80d6661
...
...
@@ -149,7 +149,7 @@ void flush_thread(void)
asmlinkage
int
m68k_clone
(
struct
pt_regs
*
regs
)
{
/* regs will be equal to current_pt_regs() */
return
do_fork
(
regs
->
d1
,
regs
->
d2
,
regs
,
0
,
return
do_fork
(
regs
->
d1
,
regs
->
d2
,
0
,
(
int
__user
*
)
regs
->
d3
,
(
int
__user
*
)
regs
->
d4
);
}
...
...
arch/mips/kernel/linux32.c
浏览文件 @
e80d6661
...
...
@@ -312,7 +312,7 @@ _sys32_clone(nabi_no_regargs struct pt_regs regs)
/* Use __dummy4 instead of getting it off the stack, so that
syscall() works. */
child_tidptr
=
(
int
__user
*
)
__dummy4
;
return
do_fork
(
clone_flags
,
newsp
,
&
regs
,
0
,
return
do_fork
(
clone_flags
,
newsp
,
0
,
parent_tidptr
,
child_tidptr
);
}
...
...
arch/mips/kernel/syscall.c
浏览文件 @
e80d6661
...
...
@@ -92,7 +92,7 @@ save_static_function(sys_fork);
static
int
__used
noinline
_sys_fork
(
nabi_no_regargs
struct
pt_regs
regs
)
{
return
do_fork
(
SIGCHLD
,
regs
.
regs
[
29
],
&
regs
,
0
,
NULL
,
NULL
);
return
do_fork
(
SIGCHLD
,
regs
.
regs
[
29
],
0
,
NULL
,
NULL
);
}
save_static_function
(
sys_clone
);
...
...
@@ -123,7 +123,7 @@ _sys_clone(nabi_no_regargs struct pt_regs regs)
#else
child_tidptr
=
(
int
__user
*
)
regs
.
regs
[
8
];
#endif
return
do_fork
(
clone_flags
,
newsp
,
&
regs
,
0
,
return
do_fork
(
clone_flags
,
newsp
,
0
,
parent_tidptr
,
child_tidptr
);
}
...
...
arch/sparc/kernel/process_32.c
浏览文件 @
e80d6661
...
...
@@ -286,8 +286,7 @@ asmlinkage int sparc_do_fork(unsigned long clone_flags,
parent_tid_ptr
=
regs
->
u_regs
[
UREG_I2
];
child_tid_ptr
=
regs
->
u_regs
[
UREG_I4
];
ret
=
do_fork
(
clone_flags
,
stack_start
,
regs
,
stack_size
,
ret
=
do_fork
(
clone_flags
,
stack_start
,
stack_size
,
(
int
__user
*
)
parent_tid_ptr
,
(
int
__user
*
)
child_tid_ptr
);
...
...
arch/sparc/kernel/process_64.c
浏览文件 @
e80d6661
...
...
@@ -601,8 +601,7 @@ asmlinkage long sparc_do_fork(unsigned long clone_flags,
child_tid_ptr
=
(
int
__user
*
)
regs
->
u_regs
[
UREG_I4
];
}
ret
=
do_fork
(
clone_flags
,
stack_start
,
regs
,
stack_size
,
ret
=
do_fork
(
clone_flags
,
stack_start
,
stack_size
,
parent_tid_ptr
,
child_tid_ptr
);
/* If we get an error and potentially restart the system
...
...
include/linux/sched.h
浏览文件 @
e80d6661
...
...
@@ -2289,7 +2289,7 @@ extern int disallow_signal(int);
extern
int
do_execve
(
const
char
*
,
const
char
__user
*
const
__user
*
,
const
char
__user
*
const
__user
*
);
extern
long
do_fork
(
unsigned
long
,
unsigned
long
,
struct
pt_regs
*
,
unsigned
long
,
int
__user
*
,
int
__user
*
);
extern
long
do_fork
(
unsigned
long
,
unsigned
long
,
unsigned
long
,
int
__user
*
,
int
__user
*
);
struct
task_struct
*
fork_idle
(
int
);
#ifdef CONFIG_GENERIC_KERNEL_THREAD
extern
pid_t
kernel_thread
(
int
(
*
fn
)(
void
*
),
void
*
arg
,
unsigned
long
flags
);
...
...
kernel/fork.c
浏览文件 @
e80d6661
...
...
@@ -1527,8 +1527,6 @@ static inline void init_idle_pids(struct pid_link *links)
struct
task_struct
*
__cpuinit
fork_idle
(
int
cpu
)
{
struct
task_struct
*
task
;
struct
pt_regs
regs
;
task
=
copy_process
(
CLONE_VM
,
0
,
0
,
NULL
,
&
init_struct_pid
,
0
);
if
(
!
IS_ERR
(
task
))
{
init_idle_pids
(
task
->
pids
);
...
...
@@ -1546,7 +1544,6 @@ struct task_struct * __cpuinit fork_idle(int cpu)
*/
long
do_fork
(
unsigned
long
clone_flags
,
unsigned
long
stack_start
,
struct
pt_regs
*
regs
,
unsigned
long
stack_size
,
int
__user
*
parent_tidptr
,
int
__user
*
child_tidptr
)
...
...
@@ -1576,7 +1573,7 @@ long do_fork(unsigned long clone_flags,
* requested, no event is reported; otherwise, report if the event
* for the type of forking is enabled.
*/
if
(
!
(
clone_flags
&
CLONE_UNTRACED
)
&&
likely
(
user_mode
(
regs
))
)
{
if
(
!
(
clone_flags
&
CLONE_UNTRACED
))
{
if
(
clone_flags
&
CLONE_VFORK
)
trace
=
PTRACE_EVENT_VFORK
;
else
if
((
clone_flags
&
CSIGNAL
)
!=
SIGCHLD
)
...
...
@@ -1632,7 +1629,7 @@ long do_fork(unsigned long clone_flags,
*/
pid_t
kernel_thread
(
int
(
*
fn
)(
void
*
),
void
*
arg
,
unsigned
long
flags
)
{
return
do_fork
(
flags
|
CLONE_VM
|
CLONE_UNTRACED
,
(
unsigned
long
)
fn
,
NULL
,
return
do_fork
(
flags
|
CLONE_VM
|
CLONE_UNTRACED
,
(
unsigned
long
)
fn
,
(
unsigned
long
)
arg
,
NULL
,
NULL
);
}
#endif
...
...
@@ -1641,7 +1638,7 @@ pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
SYSCALL_DEFINE0
(
fork
)
{
#ifdef CONFIG_MMU
return
do_fork
(
SIGCHLD
,
0
,
current_pt_regs
(),
0
,
NULL
,
NULL
);
return
do_fork
(
SIGCHLD
,
0
,
0
,
NULL
,
NULL
);
#else
/* can not support in nommu mode */
return
(
-
EINVAL
);
...
...
@@ -1652,7 +1649,7 @@ SYSCALL_DEFINE0(fork)
#ifdef __ARCH_WANT_SYS_VFORK
SYSCALL_DEFINE0
(
vfork
)
{
return
do_fork
(
CLONE_VFORK
|
CLONE_VM
|
SIGCHLD
,
0
,
current_pt_regs
(),
return
do_fork
(
CLONE_VFORK
|
CLONE_VM
|
SIGCHLD
,
0
,
0
,
NULL
,
NULL
);
}
#endif
...
...
@@ -1675,7 +1672,7 @@ SYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp,
int
,
tls_val
)
#endif
{
return
do_fork
(
clone_flags
,
newsp
,
current_pt_regs
(),
0
,
return
do_fork
(
clone_flags
,
newsp
,
0
,
parent_tidptr
,
child_tidptr
);
}
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录