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

Paul Chaignon paul.chaignon at gmail.com
Thu Aug 22 13:32:19 UTC 2019


On Tue, Aug 20, 2019 at 02:16:01PM +0300, Dmitry V. Levin wrote:
> 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?

Done.  Thanks!

Paul


More information about the Strace-devel mailing list