linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Schmitz <schmitzmic@gmail.com>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	linux-m68k <linux-m68k@lists.linux-m68k.org>
Cc: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>,
	Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: syscall_trace_enter and syscall_trace_leave for m68k w/MMU
Date: Fri, 24 Jul 2020 10:56:45 +1200	[thread overview]
Message-ID: <fe8a7e2f-cecc-1235-3649-aab0033da02b@gmail.com> (raw)
In-Reply-To: <f0c9edc0-e596-c483-b9a6-f67778bd297c@physik.fu-berlin.de>

Adrian,

m68k/mm only has syscall_trace() (in kernel/ptrace.c) which is called 
from the system call entry in kernel/entry.S (look for do_trace_* there).

syscall_trace() is called before and after syscall execution (if the 
syscall trace flag is set). Looking at the sparc 32 and 64 bit trace 
code for comparison, you might try replacing these calls by 
syscall_trace_enter() and syscall_trace_leave(). The current code in 
syscall_trace replicates the code in ptrace_report_syscall which will be 
called from syscall_trace_enter() and syscall_trace_leave(), so things 
ought to continue to function as normal.

syscall_trace() is also called from the ret_from_signal entry - no idea 
what should happen to that one. My guess is to treat this as syscall 
trace exit.

CC to Andreas - maybe there are subtleties with strace or gdb that I'm 
missing.

Cheers,

     Michael


On 23/07/20 10:03 PM, John Paul Adrian Glaubitz wrote:
> Hello!
>
> Michael and I have been working on SECCOMP in SuperH and successfully added
> the missing pieces yesterday [1].
>
> We're now looking into what needs to be done for m68k and I have noticed that
> syscall_trace_enter and syscall_trace_leave - which needs to be touched for
> SECCOMP support - are available on ColdFire and non-MMU targets for m68k.
>
> Is there a particular reason for that? Looking at 68000/entry.S, I can see
> that both functions are invoked [2] so I'm not sure why they are built
> for CONFIG_COLDFIRE and !CONFIG_MMM only.
>
> Any ideas?
>
> Adrian
>
>> [1] https://marc.info/?l=linux-sh&m=159546012829989&w=2
>> [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/m68k/68000/entry.S

  reply	other threads:[~2020-07-23 22:57 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 10:03 syscall_trace_enter and syscall_trace_leave for m68k w/MMU John Paul Adrian Glaubitz
2020-07-23 22:56 ` Michael Schmitz [this message]
2020-07-25  1:48 ` [PATCH RFC] m68k/kernel - wire up syscall_trace_enter/leave for m68k Michael Schmitz
2020-07-26  1:28 ` [PATCH RFC v2] " Michael Schmitz
2020-07-27  4:19 ` [PATCH] " Michael Schmitz
2020-07-27 10:03   ` John Paul Adrian Glaubitz
2020-07-27 20:48     ` Michael Schmitz
2020-07-27 21:09       ` John Paul Adrian Glaubitz
2020-08-26 11:18         ` Geert Uytterhoeven
2020-08-26 11:50           ` John Paul Adrian Glaubitz
2020-08-26 11:23   ` Geert Uytterhoeven
2020-08-26 11:27     ` John Paul Adrian Glaubitz
2020-08-26 12:32       ` Geert Uytterhoeven
2020-08-26 12:35         ` John Paul Adrian Glaubitz
2020-08-26 12:38           ` Geert Uytterhoeven
2020-08-26 12:42             ` John Paul Adrian Glaubitz
2020-08-26 14:22               ` Geert Uytterhoeven
2020-08-27  0:08     ` Michael Schmitz
2020-08-27  9:19       ` Geert Uytterhoeven
2020-08-27 19:29         ` Michael Schmitz
2020-08-28  8:58           ` Geert Uytterhoeven
2021-06-14 22:11             ` Michael Schmitz
2021-06-14 23:04               ` John Paul Adrian Glaubitz
2021-06-14 23:14                 ` Michael Schmitz
2021-06-15  7:51                   ` Geert Uytterhoeven
2021-06-15 20:32                     ` Michael Schmitz
2021-06-16  0:27                 ` Michael Schmitz
2020-08-05 12:23 ` syscall_trace_enter and syscall_trace_leave for m68k w/MMU Greg Ungerer
2020-08-05 12:36   ` John Paul Adrian Glaubitz

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=fe8a7e2f-cecc-1235-3649-aab0033da02b@gmail.com \
    --to=schmitzmic@gmail.com \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=kernel@mkarcher.dialup.fu-berlin.de \
    --cc=linux-m68k@lists.linux-m68k.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;
as well as URLs for NNTP newsgroup(s).