diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-11-28 05:58:11 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-27 23:18:58 -0500 |
commit | 4b27c47cf8eddb4153a026e89c7b092598c98b12 (patch) | |
tree | 5142d1c0bbfe289ee757dfc147bb6394244c4d67 /arch/sh/kernel/cpu | |
parent | c019fd8839503a91c556ae68d773e3bbb9b476e1 (diff) |
sh: syscall auditing for sh5, too.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu')
-rw-r--r-- | arch/sh/kernel/cpu/sh5/entry.S | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/sh/kernel/cpu/sh5/entry.S b/arch/sh/kernel/cpu/sh5/entry.S index 0f65bb4372da..dbf2d7684502 100644 --- a/arch/sh/kernel/cpu/sh5/entry.S +++ b/arch/sh/kernel/cpu/sh5/entry.S | |||
@@ -942,9 +942,6 @@ ret_with_reschedule: | |||
942 | getcon KCR0, r6 ! r6 contains current_thread_info | 942 | getcon KCR0, r6 ! r6 contains current_thread_info |
943 | ld.l r6, TI_FLAGS, r7 ! r7 contains current_thread_info->flags | 943 | ld.l r6, TI_FLAGS, r7 ! r7 contains current_thread_info->flags |
944 | 944 | ||
945 | ! FIXME:!!! | ||
946 | ! no handling of TIF_SYSCALL_TRACE yet!! | ||
947 | |||
948 | movi _TIF_NEED_RESCHED, r8 | 945 | movi _TIF_NEED_RESCHED, r8 |
949 | and r8, r7, r8 | 946 | and r8, r7, r8 |
950 | pta work_resched, tr0 | 947 | pta work_resched, tr0 |
@@ -1280,14 +1277,17 @@ syscall_allowed: | |||
1280 | 1277 | ||
1281 | getcon KCR0, r2 | 1278 | getcon KCR0, r2 |
1282 | ld.l r2, TI_FLAGS, r4 | 1279 | ld.l r2, TI_FLAGS, r4 |
1283 | movi (1 << TIF_SYSCALL_TRACE), r6 | 1280 | movi (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | _TIF_SYSCALL_AUDIT), r6 |
1284 | and r6, r4, r6 | 1281 | and r6, r4, r6 |
1285 | beq/l r6, ZERO, tr0 | 1282 | beq/l r6, ZERO, tr0 |
1286 | 1283 | ||
1287 | /* Trace it by calling syscall_trace before and after */ | 1284 | /* Trace it by calling syscall_trace before and after */ |
1288 | movi syscall_trace, r4 | 1285 | movi syscall_trace, r4 |
1286 | or SP, ZERO, r2 | ||
1287 | or ZERO, ZERO, r3 | ||
1289 | ptabs r4, tr0 | 1288 | ptabs r4, tr0 |
1290 | blink tr0, LINK | 1289 | blink tr0, LINK |
1290 | |||
1291 | /* Reload syscall number as r5 is trashed by syscall_trace */ | 1291 | /* Reload syscall number as r5 is trashed by syscall_trace */ |
1292 | ld.q SP, FRAME_S(FSYSCALL_ID), r5 | 1292 | ld.q SP, FRAME_S(FSYSCALL_ID), r5 |
1293 | andi r5, 0x1ff, r5 | 1293 | andi r5, 0x1ff, r5 |
@@ -1321,6 +1321,8 @@ syscall_ret_trace: | |||
1321 | st.q SP, FRAME_R(9), r2 /* Save return value */ | 1321 | st.q SP, FRAME_R(9), r2 /* Save return value */ |
1322 | 1322 | ||
1323 | movi syscall_trace, LINK | 1323 | movi syscall_trace, LINK |
1324 | or SP, ZERO, r2 | ||
1325 | movi 1, r3 | ||
1324 | ptabs LINK, tr0 | 1326 | ptabs LINK, tr0 |
1325 | blink tr0, LINK | 1327 | blink tr0, LINK |
1326 | 1328 | ||