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
bec9b2b2
Commit
bec9b2b2
authored
Sep 26, 2012
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MIPS: Move audit_arch() helper function to __syscall_get_arch().
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
c0ff3c53
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
+17
-13
arch/mips/include/asm/syscall.h
arch/mips/include/asm/syscall.h
+14
-0
arch/mips/kernel/ptrace.c
arch/mips/kernel/ptrace.c
+3
-13
No files found.
arch/mips/include/asm/syscall.h
View file @
bec9b2b2
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
#ifndef __ASM_MIPS_SYSCALL_H
#ifndef __ASM_MIPS_SYSCALL_H
#define __ASM_MIPS_SYSCALL_H
#define __ASM_MIPS_SYSCALL_H
#include <linux/audit.h>
#include <linux/elf-em.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/sched.h>
#include <linux/uaccess.h>
#include <linux/uaccess.h>
...
@@ -80,4 +82,16 @@ extern const unsigned long sys_call_table[];
...
@@ -80,4 +82,16 @@ extern const unsigned long sys_call_table[];
extern
const
unsigned
long
sys32_call_table
[];
extern
const
unsigned
long
sys32_call_table
[];
extern
const
unsigned
long
sysn32_call_table
[];
extern
const
unsigned
long
sysn32_call_table
[];
static
inline
int
__syscall_get_arch
(
void
)
{
int
arch
=
EM_MIPS
;
#ifdef CONFIG_64BIT
arch
|=
__AUDIT_ARCH_64BIT
;
#endif
#if defined(__LITTLE_ENDIAN)
arch
|=
__AUDIT_ARCH_LE
;
#endif
return
arch
;
}
#endif
/* __ASM_MIPS_SYSCALL_H */
#endif
/* __ASM_MIPS_SYSCALL_H */
arch/mips/kernel/ptrace.c
View file @
bec9b2b2
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include <asm/mipsmtregs.h>
#include <asm/mipsmtregs.h>
#include <asm/pgtable.h>
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/page.h>
#include <asm/syscall.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/bootinfo.h>
#include <asm/bootinfo.h>
#include <asm/reg.h>
#include <asm/reg.h>
...
@@ -647,18 +648,6 @@ long arch_ptrace(struct task_struct *child, long request,
...
@@ -647,18 +648,6 @@ long arch_ptrace(struct task_struct *child, long request,
return
ret
;
return
ret
;
}
}
static
inline
int
audit_arch
(
void
)
{
int
arch
=
EM_MIPS
;
#ifdef CONFIG_64BIT
arch
|=
__AUDIT_ARCH_64BIT
;
#endif
#if defined(__LITTLE_ENDIAN)
arch
|=
__AUDIT_ARCH_LE
;
#endif
return
arch
;
}
/*
/*
* Notification of system call entry/exit
* Notification of system call entry/exit
* - triggered by current->work.syscall_trace
* - triggered by current->work.syscall_trace
...
@@ -673,7 +662,8 @@ asmlinkage void syscall_trace_enter(struct pt_regs *regs)
...
@@ -673,7 +662,8 @@ asmlinkage void syscall_trace_enter(struct pt_regs *regs)
if
(
test_thread_flag
(
TIF_SYSCALL_TRACE
))
if
(
test_thread_flag
(
TIF_SYSCALL_TRACE
))
ptrace_report_syscall
(
regs
);
ptrace_report_syscall
(
regs
);
audit_syscall_entry
(
audit_arch
(),
regs
->
regs
[
2
],
audit_syscall_entry
(
__syscall_get_arch
(),
regs
->
regs
[
2
],
regs
->
regs
[
4
],
regs
->
regs
[
5
],
regs
->
regs
[
4
],
regs
->
regs
[
5
],
regs
->
regs
[
6
],
regs
->
regs
[
7
]);
regs
->
regs
[
6
],
regs
->
regs
[
7
]);
}
}
...
...
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