From: Michael Schmitz <schmitzmic@gmail.com>
To: linux-m68k@vger.kernel.org, geert@linux-m68k.org
Cc: ebiederm@xmission.com, viro@zeniv.linux.org.uk,
glaubitz@physik.fu-berlin.de,
Michael Schmitz <schmitzmic@gmail.com>
Subject: [PATCH v10 1/3] m68k/kernel - wire up syscall_trace_enter/leave for m68k
Date: Thu, 27 Jan 2022 20:41:56 +1300 [thread overview]
Message-ID: <20220127074158.25888-2-schmitzmic@gmail.com> (raw)
In-Reply-To: <20220127074158.25888-1-schmitzmic@gmail.com>
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>
--
Changes from v8:
- adapt ptrace.c patch to recent changes by Eric Biederman
Changes from v7:
Al Viro:
- split first patch to separate the switch to
syscall_trace_enter/leave() from return code checks
Changes from v6:
Geert Uytterhoeven:
- add syscall_trace_enter() return code check for 68000
and coldfire
Changes from v5:
- add comment to explain optimization
Changes from v4:
Andreas Schwab:
- optimize return code test (addql #1,%d0 for cmpil #-1,%d0)
- spelling fix in commit message
Changes from v3:
- change syscall_trace_enter return code test from !=0 to ==-1
revert syscall trace return code checks
---
arch/m68k/kernel/entry.S | 4 ++--
arch/m68k/kernel/ptrace.c | 7 -------
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
index 9434fca68de5..18f278bdbd21 100644
--- a/arch/m68k/kernel/entry.S
+++ b/arch/m68k/kernel/entry.S
@@ -181,7 +181,7 @@ do_trace_entry:
movel #-ENOSYS,%sp@(PT_OFF_D0)| needed for strace
subql #4,%sp
SAVE_SWITCH_STACK
- jbsr syscall_trace
+ jbsr syscall_trace_enter
RESTORE_SWITCH_STACK
addql #4,%sp
movel %sp@(PT_OFF_ORIG_D0),%d0
@@ -194,7 +194,7 @@ badsys:
do_trace_exit:
subql #4,%sp
SAVE_SWITCH_STACK
- jbsr syscall_trace
+ jbsr syscall_trace_leave
RESTORE_SWITCH_STACK
addql #4,%sp
jra .Lret_from_exception
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c
index aa3a0b8d07e9..74d58a82a135 100644
--- a/arch/m68k/kernel/ptrace.c
+++ b/arch/m68k/kernel/ptrace.c
@@ -271,12 +271,6 @@ long arch_ptrace(struct task_struct *child, long request,
return -EIO;
}
-asmlinkage void syscall_trace(void)
-{
- ptrace_report_syscall(0);
-}
-
-#if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU)
asmlinkage int syscall_trace_enter(void)
{
int ret = 0;
@@ -291,4 +285,3 @@ asmlinkage void syscall_trace_leave(void)
if (test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall_exit(task_pt_regs(current), 0);
}
-#endif /* CONFIG_COLDFIRE */
--
2.17.1
next prev parent reply other threads:[~2022-01-27 7:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 7:41 [PATCH v10 0/3] Add kernel seccomp support for m68k Michael Schmitz
2022-01-27 7:41 ` Michael Schmitz [this message]
2022-05-09 11:06 ` [PATCH v10 1/3] m68k/kernel - wire up syscall_trace_enter/leave " Geert Uytterhoeven
2022-01-27 7:41 ` [PATCH v10 2/3] m68k/kernel - check syscall_trace_enter() return code on m68k Michael Schmitz
2022-01-27 7:41 ` [PATCH v10 3/3] m68k: add kernel seccomp support Michael Schmitz
2022-01-27 9:09 ` [PATCH v10 0/3] Add kernel seccomp support for m68k John Paul Adrian Glaubitz
2022-01-28 6:51 ` Michael Schmitz
2022-05-03 21:53 ` Eric W. Biederman
2022-05-06 8:37 ` Michael Schmitz
2022-05-09 11:16 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220127074158.25888-2-schmitzmic@gmail.com \
--to=schmitzmic@gmail.com \
--cc=ebiederm@xmission.com \
--cc=geert@linux-m68k.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-m68k@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.