diff options
author | Yuichi Nakamura <ynakam@hitachisoft.jp> | 2007-11-10 05:21:34 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-27 23:18:57 -0500 |
commit | 1322b9def91ab8e9e673b58a64e13d6effaaa652 (patch) | |
tree | b52716f0d120f9d51b0cf32462c4f6f68d3c412b /arch/sh/kernel/entry-common.S | |
parent | 12760cb4df2a244efbaa262b32590af295c0b8e1 (diff) |
sh: syscall audit support.
Support syscall auditing..
Signed-off-by: Yuichi Nakamura <ynakam@hitachisoft.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/entry-common.S')
-rw-r--r-- | arch/sh/kernel/entry-common.S | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S index e0317ed080c3..397ac71d97f1 100644 --- a/arch/sh/kernel/entry-common.S +++ b/arch/sh/kernel/entry-common.S | |||
@@ -224,7 +224,7 @@ work_resched: | |||
224 | syscall_exit_work: | 224 | syscall_exit_work: |
225 | ! r0: current_thread_info->flags | 225 | ! r0: current_thread_info->flags |
226 | ! r8: current_thread_info | 226 | ! r8: current_thread_info |
227 | tst #_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP, r0 | 227 | tst #_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | _TIF_SYSCALL_AUDIT, r0 |
228 | bt/s work_pending | 228 | bt/s work_pending |
229 | tst #_TIF_NEED_RESCHED, r0 | 229 | tst #_TIF_NEED_RESCHED, r0 |
230 | #ifdef CONFIG_TRACE_IRQFLAGS | 230 | #ifdef CONFIG_TRACE_IRQFLAGS |
@@ -234,6 +234,8 @@ syscall_exit_work: | |||
234 | #endif | 234 | #endif |
235 | sti | 235 | sti |
236 | ! XXX setup arguments... | 236 | ! XXX setup arguments... |
237 | mov r15, r4 | ||
238 | mov #1, r5 | ||
237 | mov.l 4f, r0 ! do_syscall_trace | 239 | mov.l 4f, r0 ! do_syscall_trace |
238 | jsr @r0 | 240 | jsr @r0 |
239 | nop | 241 | nop |
@@ -244,6 +246,8 @@ syscall_exit_work: | |||
244 | syscall_trace_entry: | 246 | syscall_trace_entry: |
245 | ! Yes it is traced. | 247 | ! Yes it is traced. |
246 | ! XXX setup arguments... | 248 | ! XXX setup arguments... |
249 | mov r15, r4 | ||
250 | mov #0, r5 | ||
247 | mov.l 4f, r11 ! Call do_syscall_trace which notifies | 251 | mov.l 4f, r11 ! Call do_syscall_trace which notifies |
248 | jsr @r11 ! superior (will chomp R[0-7]) | 252 | jsr @r11 ! superior (will chomp R[0-7]) |
249 | nop | 253 | nop |
@@ -366,7 +370,7 @@ ENTRY(system_call) | |||
366 | ! | 370 | ! |
367 | get_current_thread_info r8, r10 | 371 | get_current_thread_info r8, r10 |
368 | mov.l @(TI_FLAGS,r8), r8 | 372 | mov.l @(TI_FLAGS,r8), r8 |
369 | mov #_TIF_SYSCALL_TRACE, r10 | 373 | mov #(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT), r10 |
370 | tst r10, r8 | 374 | tst r10, r8 |
371 | bf syscall_trace_entry | 375 | bf syscall_trace_entry |
372 | ! | 376 | ! |