Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
4b27c47c
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4b27c47c
编写于
11月 28, 2007
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sh: syscall auditing for sh5, too.
Signed-off-by:
N
Paul Mundt
<
lethal@linux-sh.org
>
上级
c019fd88
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
30 addition
and
18 deletion
+30
-18
arch/sh/kernel/cpu/sh5/entry.S
arch/sh/kernel/cpu/sh5/entry.S
+6
-4
arch/sh/kernel/ptrace_64.c
arch/sh/kernel/ptrace_64.c
+24
-14
未找到文件。
arch/sh/kernel/cpu/sh5/entry.S
浏览文件 @
4b27c47c
...
...
@@ -942,9 +942,6 @@ ret_with_reschedule:
getcon
KCR0
,
r6
!
r6
contains
current_thread_info
ld.l
r6
,
TI_FLAGS
,
r7
!
r7
contains
current_thread_info
->
flags
!
FIXME
:
!!!
!
no
handling
of
TIF_SYSCALL_TRACE
yet
!!
movi
_TIF_NEED_RESCHED
,
r8
and
r8
,
r7
,
r8
pta
work_resched
,
tr0
...
...
@@ -1280,14 +1277,17 @@ syscall_allowed:
getcon
KCR0
,
r2
ld.l
r2
,
TI_FLAGS
,
r4
movi
(
1
<<
TIF_SYSCALL_TRACE
),
r6
movi
(
_TIF_SYSCALL_TRACE
| _TIF_SINGLESTEP |
_TIF_SYSCALL_AUDIT
),
r6
and
r6
,
r4
,
r6
beq
/
l
r6
,
ZERO
,
tr0
/
*
Trace
it
by
calling
syscall_trace
before
and
after
*/
movi
syscall_trace
,
r4
or
SP
,
ZERO
,
r2
or
ZERO
,
ZERO
,
r3
ptabs
r4
,
tr0
blink
tr0
,
LINK
/
*
Reload
syscall
number
as
r5
is
trashed
by
syscall_trace
*/
ld.q
SP
,
FRAME_S
(
FSYSCALL_ID
),
r5
andi
r5
,
0x1ff
,
r5
...
...
@@ -1321,6 +1321,8 @@ syscall_ret_trace:
st.q
SP
,
FRAME_R
(
9
),
r2
/*
Save
return
value
*/
movi
syscall_trace
,
LINK
or
SP
,
ZERO
,
r2
movi
1
,
r3
ptabs
LINK
,
tr0
blink
tr0
,
LINK
...
...
arch/sh/kernel/ptrace_64.c
浏览文件 @
4b27c47c
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* arch/sh64/kernel/ptrace.c
* arch/sh/kernel/ptrace_64.c
*
* Copyright (C) 2000, 2001 Paolo Alberelli
* Copyright (C) 2003 Paul Mundt
* Copyright (C) 2003
- 2007
Paul Mundt
*
* Started from SH3/4 version:
* SuperH version: Copyright (C) 1999, 2000 Kaz Kojima & Niibe Yutaka
...
...
@@ -15,8 +11,10 @@
* By Ross Biro 1/23/92
* edited by Linus Torvalds
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#include <linux/kernel.h>
#include <linux/rwsem.h>
#include <linux/sched.h>
...
...
@@ -28,7 +26,7 @@
#include <linux/user.h>
#include <linux/signal.h>
#include <linux/syscalls.h>
#include <linux/audit.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
...
...
@@ -274,17 +272,23 @@ asmlinkage int sh64_ptrace(long request, long pid, long addr, long data)
return
sys_ptrace
(
request
,
pid
,
addr
,
data
);
}
asmlinkage
void
syscall_trace
(
void
)
asmlinkage
void
syscall_trace
(
struct
pt_regs
*
regs
,
int
entryexit
)
{
struct
task_struct
*
tsk
=
current
;
if
(
!
test_thread_flag
(
TIF_SYSCALL_TRACE
))
return
;
if
(
unlikely
(
current
->
audit_context
)
&&
entryexit
)
audit_syscall_exit
(
AUDITSC_RESULT
(
regs
->
regs
[
9
]),
regs
->
regs
[
9
]);
if
(
!
test_thread_flag
(
TIF_SYSCALL_TRACE
)
&&
!
test_thread_flag
(
TIF_SINGLESTEP
))
goto
out
;
if
(
!
(
tsk
->
ptrace
&
PT_PTRACED
))
return
;
goto
out
;
ptrace_notify
(
SIGTRAP
|
((
current
->
ptrace
&
PT_TRACESYSGOOD
)
&&
!
test_thread_flag
(
TIF_SINGLESTEP
)
?
0x80
:
0
));
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
...
...
@@ -294,6 +298,12 @@ asmlinkage void syscall_trace(void)
send_sig
(
tsk
->
exit_code
,
tsk
,
1
);
tsk
->
exit_code
=
0
;
}
out:
if
(
unlikely
(
current
->
audit_context
)
&&
!
entryexit
)
audit_syscall_entry
(
AUDIT_ARCH_SH
,
regs
->
regs
[
1
],
regs
->
regs
[
2
],
regs
->
regs
[
3
],
regs
->
regs
[
4
],
regs
->
regs
[
5
]);
}
/* Called with interrupts disabled */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录