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
Kirill Smelkov
linux
Commits
f8280c8d
Commit
f8280c8d
authored
May 19, 2005
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tasteless #ifdef mess in audit_arch(), minor cleanups.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
fdb551a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
+12
-17
arch/mips/kernel/ptrace.c
arch/mips/kernel/ptrace.c
+12
-17
No files found.
arch/mips/kernel/ptrace.c
View file @
f8280c8d
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <linux/security.h>
#include <linux/security.h>
#include <linux/signal.h>
#include <linux/signal.h>
#include <asm/byteorder.h>
#include <asm/cpu.h>
#include <asm/cpu.h>
#include <asm/fpu.h>
#include <asm/fpu.h>
#include <asm/mipsregs.h>
#include <asm/mipsregs.h>
...
@@ -308,21 +309,14 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
...
@@ -308,21 +309,14 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
static
inline
int
audit_arch
(
void
)
static
inline
int
audit_arch
(
void
)
{
{
#ifdef CONFIG_CPU_LITTLE_ENDIAN
int
arch
=
EM_MIPS
;
#ifdef CONFIG_64BIT
#ifdef CONFIG_64BIT
if
(
!
(
current
->
thread
.
mflags
&
MF_32BIT_REGS
))
arch
|=
__AUDIT_ARCH_64BIT
;
return
AUDIT_ARCH_MIPSEL64
;
#endif
#endif
/* MIPS64 */
#if defined(__LITTLE_ENDIAN)
return
AUDIT_ARCH_MIPSEL
;
arch
|=
__AUDIT_ARCH_LE
;
#endif
#else
/* big endian... */
return
arch
;
#ifdef CONFIG_64BIT
if
(
!
(
current
->
thread
.
mflags
&
MF_32BIT_REGS
))
return
AUDIT_ARCH_MIPS64
;
#endif
/* MIPS64 */
return
AUDIT_ARCH_MIPS
;
#endif
/* endian */
}
}
/*
/*
...
@@ -332,12 +326,13 @@ static inline int audit_arch(void)
...
@@ -332,12 +326,13 @@ static inline int audit_arch(void)
asmlinkage
void
do_syscall_trace
(
struct
pt_regs
*
regs
,
int
entryexit
)
asmlinkage
void
do_syscall_trace
(
struct
pt_regs
*
regs
,
int
entryexit
)
{
{
if
(
unlikely
(
current
->
audit_context
)
&&
entryexit
)
if
(
unlikely
(
current
->
audit_context
)
&&
entryexit
)
audit_syscall_exit
(
current
,
AUDITSC_RESULT
(
regs
->
regs
[
2
]),
regs
->
regs
[
2
]);
audit_syscall_exit
(
current
,
AUDITSC_RESULT
(
regs
->
regs
[
2
]),
regs
->
regs
[
2
]);
if
(
!
test_thread_flag
(
TIF_SYSCALL_TRACE
))
goto
out
;
if
(
!
(
current
->
ptrace
&
PT_PTRACED
))
if
(
!
(
current
->
ptrace
&
PT_PTRACED
))
goto
out
;
goto
out
;
if
(
!
test_thread_flag
(
TIF_SYSCALL_TRACE
))
goto
out
;
/* The 0x80 provides a way for the tracing parent to distinguish
/* The 0x80 provides a way for the tracing parent to distinguish
between a syscall stop and SIGTRAP delivery */
between a syscall stop and SIGTRAP delivery */
...
...
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