public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Michael Schmitz <schmitzmic@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
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: Thu, 17 Jun 2021 11:37:30 +1200	[thread overview]
Message-ID: <2e7a90e3-fd6c-714b-10e7-e12c83afe862@gmail.com> (raw)
In-Reply-To: <87v96es1z8.fsf@igel.home>

Hi Andreas,

On 16/06/21 7:27 pm, Andreas Schwab wrote:
> 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/
Ouch ...
>
>> 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.

Thanks, that wasn't obvious at first glance!

Will fix in v5 ...

Cheers,

     Michael

>
>> +	jeq	ret_from_syscall
> Andreas.
>

      reply	other threads:[~2021-06-16 23:37 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
2021-06-16 23:37   ` Michael Schmitz [this message]

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=2e7a90e3-fd6c-714b-10e7-e12c83afe862@gmail.com \
    --to=schmitzmic@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-m68k@vger.kernel.org \
    --cc=schwab@linux-m68k.org \
    /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