Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
8b659a39
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,发现更多精彩内容 >>
提交
8b659a39
编写于
5月 19, 2011
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MIPS: Split do_syscall_trace into two functions.
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
c19c20ac
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
43 addition
and
20 deletion
+43
-20
arch/mips/include/asm/ptrace.h
arch/mips/include/asm/ptrace.h
+2
-1
arch/mips/kernel/entry.S
arch/mips/kernel/entry.S
+2
-3
arch/mips/kernel/ptrace.c
arch/mips/kernel/ptrace.c
+35
-8
arch/mips/kernel/scall32-o32.S
arch/mips/kernel/scall32-o32.S
+1
-2
arch/mips/kernel/scall64-64.S
arch/mips/kernel/scall64-64.S
+1
-2
arch/mips/kernel/scall64-n32.S
arch/mips/kernel/scall64-n32.S
+1
-2
arch/mips/kernel/scall64-o32.S
arch/mips/kernel/scall64-o32.S
+1
-2
未找到文件。
arch/mips/include/asm/ptrace.h
浏览文件 @
8b659a39
...
...
@@ -141,7 +141,8 @@ extern int ptrace_set_watch_regs(struct task_struct *child,
#define instruction_pointer(regs) ((regs)->cp0_epc)
#define profile_pc(regs) instruction_pointer(regs)
extern
asmlinkage
void
do_syscall_trace
(
struct
pt_regs
*
regs
,
int
entryexit
);
extern
asmlinkage
void
syscall_trace_enter
(
struct
pt_regs
*
regs
);
extern
asmlinkage
void
syscall_trace_leave
(
struct
pt_regs
*
regs
);
extern
NORET_TYPE
void
die
(
const
char
*
,
struct
pt_regs
*
)
ATTRIB_NORET
;
...
...
arch/mips/kernel/entry.S
浏览文件 @
8b659a39
...
...
@@ -170,11 +170,10 @@ syscall_exit_work:
li
t0
,
_TIF_WORK_SYSCALL_EXIT
and
t0
,
a2
#
a2
is
preloaded
with
TI_FLAGS
beqz
t0
,
work_pending
#
trace
bit
set
?
local_irq_enable
#
could
let
do_syscall_trac
e
()
local_irq_enable
#
could
let
syscall_trace_leav
e
()
#
call
schedule
()
instead
move
a0
,
sp
li
a1
,
1
jal
do_syscall_trace
jal
syscall_trace_leave
b
resume_userspace
#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_MIPS_MT)
...
...
arch/mips/kernel/ptrace.c
浏览文件 @
8b659a39
...
...
@@ -533,15 +533,10 @@ static inline int audit_arch(void)
* Notification of system call entry/exit
* - triggered by current->work.syscall_trace
*/
asmlinkage
void
do_syscall_trace
(
struct
pt_regs
*
regs
,
int
entryexit
)
asmlinkage
void
syscall_trace_enter
(
struct
pt_regs
*
regs
)
{
/* do the secure computing check first */
if
(
!
entryexit
)
secure_computing
(
regs
->
regs
[
2
]);
if
(
unlikely
(
current
->
audit_context
)
&&
entryexit
)
audit_syscall_exit
(
AUDITSC_RESULT
(
regs
->
regs
[
7
]),
-
regs
->
regs
[
2
]);
secure_computing
(
regs
->
regs
[
2
]);
if
(
!
(
current
->
ptrace
&
PT_PTRACED
))
goto
out
;
...
...
@@ -565,8 +560,40 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit)
}
out:
if
(
unlikely
(
current
->
audit_context
)
&&
!
entryexit
)
if
(
unlikely
(
current
->
audit_context
))
audit_syscall_entry
(
audit_arch
(),
regs
->
regs
[
2
],
regs
->
regs
[
4
],
regs
->
regs
[
5
],
regs
->
regs
[
6
],
regs
->
regs
[
7
]);
}
/*
* Notification of system call entry/exit
* - triggered by current->work.syscall_trace
*/
asmlinkage
void
syscall_trace_leave
(
struct
pt_regs
*
regs
)
{
if
(
unlikely
(
current
->
audit_context
))
audit_syscall_exit
(
AUDITSC_RESULT
(
regs
->
regs
[
7
]),
-
regs
->
regs
[
2
]);
if
(
!
(
current
->
ptrace
&
PT_PTRACED
))
return
;
if
(
!
test_thread_flag
(
TIF_SYSCALL_TRACE
))
return
;
/* The 0x80 provides a way for the tracing parent to distinguish
between a syscall stop and SIGTRAP delivery */
ptrace_notify
(
SIGTRAP
|
((
current
->
ptrace
&
PT_TRACESYSGOOD
)
?
0x80
:
0
));
/*
* this isn't the same as continuing with a signal, but it will do
* for normal use. strace only continues with a signal if the
* stopping signal is not SIGTRAP. -brl
*/
if
(
current
->
exit_code
)
{
send_sig
(
current
->
exit_code
,
current
,
1
);
current
->
exit_code
=
0
;
}
}
arch/mips/kernel/scall32-o32.S
浏览文件 @
8b659a39
...
...
@@ -88,8 +88,7 @@ syscall_trace_entry:
SAVE_STATIC
move
s0
,
t2
move
a0
,
sp
li
a1
,
0
jal
do_syscall_trace
jal
syscall_trace_enter
move
t0
,
s0
RESTORE_STATIC
...
...
arch/mips/kernel/scall64-64.S
浏览文件 @
8b659a39
...
...
@@ -91,8 +91,7 @@ syscall_trace_entry:
SAVE_STATIC
move
s0
,
t2
move
a0
,
sp
li
a1
,
0
jal
do_syscall_trace
jal
syscall_trace_enter
move
t0
,
s0
RESTORE_STATIC
...
...
arch/mips/kernel/scall64-n32.S
浏览文件 @
8b659a39
...
...
@@ -89,8 +89,7 @@ n32_syscall_trace_entry:
SAVE_STATIC
move
s0
,
t2
move
a0
,
sp
li
a1
,
0
jal
do_syscall_trace
jal
syscall_trace_enter
move
t0
,
s0
RESTORE_STATIC
...
...
arch/mips/kernel/scall64-o32.S
浏览文件 @
8b659a39
...
...
@@ -123,8 +123,7 @@ trace_a_syscall:
move
s0
,
t2
#
Save
syscall
pointer
move
a0
,
sp
li
a1
,
0
jal
do_syscall_trace
jal
syscall_trace_enter
move
t0
,
s0
RESTORE_STATIC
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录