[PATCH v3 1/4] Add seccomp-filter syscall flag

Dmitry V. Levin ldv at altlinux.org
Tue Aug 20 11:16:01 UTC 2019


On Thu, Aug 15, 2019 at 07:51:36PM +0200, Paul Chaignon wrote:
> This commit adds a new syscall flag for syscall that are traced by default
> under seccomp-filter.
> 
> * sysent.h (TRACE_SECCOMP_DEFAULT): Define new flag.
> * sysent_shorthand_defs.h (TSD): Define new flag shorthand.
> * linux/32/syscallent.h: Add TSD flag.
> * linux/64/syscallent.h: Likewise.
> * linux/alpha/syscallent.h: Likewise.
> * linux/arm/syscallent.h: Likewise.
> * linux/avr32/syscallent.h: Likewise.
> * linux/bfin/syscallent.h: Likewise.
> * linux/hppa/syscallent.h: Likewise.
> * linux/i386/syscallent.h: Likewise.
> * linux/ia64/syscallent.h: Likewise.
> * linux/m68k/syscallent.h: Likewise.
> * linux/microblaze/syscallent.h: Likewise.
> * linux/mips/syscallent-n32.h: Likewise.
> * linux/mips/syscallent-n64.h: Likewise.
> * linux/mips/syscallent-o32.h: Likewise.
> * linux/powerpc/syscallent.h: Likewise.
> * linux/powerpc64/syscallent.h: Likewise.
> * linux/s390/syscallent.h: Likewise.
> * linux/s390x/syscallent.h: Likewise.
> * linux/sh/syscallent.h: Likewise.
> * linux/sh64/syscallent.h: Likewise.
> * linux/sparc/syscallent.h: Likewise.
> * linux/sparc64/syscallent.h: Likewise.
> * linux/x32/syscallent.h: Likewise.
> * linux/x86_64/syscallent.h: Likewise.
> * linux/xtensa/syscallent.h: Likewise.

I was able to reproduce the syscallent part of this patch with
the following script:

$ git grep -l 'SEN(\(execv\|ipc\|socketcall\|ipc\)' |
  xargs -r sed -i -e '/SEN(execv/ s/TP|/&TSD|/' -e '/SEN(ipc)/ s/TI/&|TSD/' \
  -e '/SEN(socketcall)/ s/TD/&|TSD/' -e '/SEN(syscall)/ s/0,/TSD,/'

Could you add a reproducer script to the commit message, please?


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20190820/ed1c376b/attachment.bin>


More information about the Strace-devel mailing list