public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Michael Schmitz <schmitzmic@gmail.com>
Cc: linux-m68k@vger.kernel.org, geert@linux-m68k.org,
	glaubitz@physik.fu-berlin.de
Subject: Re: [PATCH v4] m68k/kernel - wire up syscall_trace_enter/leave for m68k
Date: Wed, 16 Jun 2021 09:27:55 +0200	[thread overview]
Message-ID: <87v96es1z8.fsf@igel.home> (raw)
In-Reply-To: <1623804565-25473-1-git-send-email-schmitzmic@gmail.com> (Michael Schmitz's message of "Wed, 16 Jun 2021 12:49:25 +1200")

On Jun 16 2021, Michael Schmitz wrote:

> 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. Check return code of
> syscall_trace_enter(), and skip syscall if -1. Return code will be
> left at what had been set by by ptrace or seccomp (in regs->d0).

s/by by/by/

> diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
> index 9dd76fb..e949b66 100644
> --- a/arch/m68k/kernel/entry.S
> +++ b/arch/m68k/kernel/entry.S
> @@ -164,9 +164,11 @@ 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
> +	cmpil	#-1,%d0

That can be optimized as addql #1,%d0.

> +	jeq	ret_from_syscall

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

  reply	other threads:[~2021-06-16  7:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16  0:49 [PATCH v4] m68k/kernel - wire up syscall_trace_enter/leave for m68k Michael Schmitz
2021-06-16  7:27 ` Andreas Schwab [this message]
2021-06-16 23:37   ` Michael Schmitz

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=87v96es1z8.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=geert@linux-m68k.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-m68k@vger.kernel.org \
    --cc=schmitzmic@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox