mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
m68k: Wire up syscall_trace_enter/leave for m68k
m68k (other than Coldfire) uses syscall_trace for both trace entry and trace exit. Seccomp support requires separate entry points for trace entry and exit which are already provided for Coldfire. Replace syscall_trace by syscall_trace_enter and syscall_trace_leave in preparation for seccomp support. No regression seen in testing with strace on ARAnyM. Signed-off-by: Michael Schmitz <schmitzmic@gmail.com> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Link: https://lore.kernel.org/r/20220127074158.25888-2-schmitzmic@gmail.com Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
parent
a96e4ebf3d
commit
c862fe70b0
2 changed files with 2 additions and 9 deletions
|
@ -181,7 +181,7 @@ do_trace_entry:
|
||||||
movel #-ENOSYS,%sp@(PT_OFF_D0)| needed for strace
|
movel #-ENOSYS,%sp@(PT_OFF_D0)| needed for strace
|
||||||
subql #4,%sp
|
subql #4,%sp
|
||||||
SAVE_SWITCH_STACK
|
SAVE_SWITCH_STACK
|
||||||
jbsr syscall_trace
|
jbsr syscall_trace_enter
|
||||||
RESTORE_SWITCH_STACK
|
RESTORE_SWITCH_STACK
|
||||||
addql #4,%sp
|
addql #4,%sp
|
||||||
movel %sp@(PT_OFF_ORIG_D0),%d0
|
movel %sp@(PT_OFF_ORIG_D0),%d0
|
||||||
|
@ -194,7 +194,7 @@ badsys:
|
||||||
do_trace_exit:
|
do_trace_exit:
|
||||||
subql #4,%sp
|
subql #4,%sp
|
||||||
SAVE_SWITCH_STACK
|
SAVE_SWITCH_STACK
|
||||||
jbsr syscall_trace
|
jbsr syscall_trace_leave
|
||||||
RESTORE_SWITCH_STACK
|
RESTORE_SWITCH_STACK
|
||||||
addql #4,%sp
|
addql #4,%sp
|
||||||
jra .Lret_from_exception
|
jra .Lret_from_exception
|
||||||
|
|
|
@ -270,12 +270,6 @@ out_eio:
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
asmlinkage void syscall_trace(void)
|
|
||||||
{
|
|
||||||
ptrace_report_syscall(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU)
|
|
||||||
asmlinkage int syscall_trace_enter(void)
|
asmlinkage int syscall_trace_enter(void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -290,4 +284,3 @@ asmlinkage void syscall_trace_leave(void)
|
||||||
if (test_thread_flag(TIF_SYSCALL_TRACE))
|
if (test_thread_flag(TIF_SYSCALL_TRACE))
|
||||||
ptrace_report_syscall_exit(task_pt_regs(current), 0);
|
ptrace_report_syscall_exit(task_pt_regs(current), 0);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_COLDFIRE */
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue