Hi Michael, On Mon, Jul 27, 2020 at 6:19 AM Michael Schmitz <schmitzmic@xxxxxxxxx> 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 nonzero. Return code will be left at what had been set by by ptrace or seccomp. No regression seen in testing with strace on ARAnyM. Signed-off-by: Michael Schmitz <schmitzmic@xxxxxxxxx>
Thanks for your patch!
Changes from RFC v1: - add return code check in do_trace_entry branch to enable syscall filtering (will return -EPERM) - change to use testl for return code check (suggested by Andreas Schwab) Changes from RFC v2: - don't set return code of filtered syscall - seccomp may want to set that for use by calling process.
As your email subject didn't contain "v3", b4[*] insists on picking up RFC v2, and refuses to pick up the latest version, even when forced (msgid not present)... The patch itself looks good to me. Does it make sense to apply it before we have real seccomp support? [*] https://people.kernel.org/monsieuricon/introducing-b4-and-patch-attestation Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds