Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
bc3d22c1
Commit
bc3d22c1
authored
Jul 17, 2012
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MIPS: ptrace: Use tracehook helpers.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
46e12c07
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
41 deletions
+5
-41
arch/mips/kernel/ptrace.c
arch/mips/kernel/ptrace.c
+5
-41
No files found.
arch/mips/kernel/ptrace.c
View file @
bc3d22c1
...
...
@@ -24,6 +24,7 @@
#include <linux/smp.h>
#include <linux/user.h>
#include <linux/security.h>
#include <linux/tracehook.h>
#include <linux/audit.h>
#include <linux/seccomp.h>
...
...
@@ -540,28 +541,9 @@ asmlinkage void syscall_trace_enter(struct pt_regs *regs)
/* do the secure computing check first */
secure_computing_strict
(
regs
->
regs
[
2
]);
if
(
!
(
current
->
ptrace
&
PT_PTRACED
))
goto
out
;
if
(
!
test_thread_flag
(
TIF_SYSCALL_TRACE
))
goto
out
;
/* 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
;
}
if
(
test_thread_flag
(
TIF_SYSCALL_TRACE
))
ptrace_report_syscall
(
regs
);
out:
audit_syscall_entry
(
audit_arch
(),
regs
->
regs
[
2
],
regs
->
regs
[
4
],
regs
->
regs
[
5
],
regs
->
regs
[
6
],
regs
->
regs
[
7
]);
...
...
@@ -582,26 +564,8 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs)
audit_syscall_exit
(
regs
);
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
;
}
if
(
test_thread_flag
(
TIF_SYSCALL_TRACE
))
tracehook_report_syscall_exit
(
regs
,
0
);
user_enter
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment