From 90edbb4e01e8a65ae7415af88bd194cea1aa0520 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 17 May 2015 22:49:23 +0200 Subject: siginfo: add signal info for seccomp related SIGSYS uClibc doesn't define signal info for the SIGSYS signal which is issued in case of hitting a syscall prohibited by seccomp. This is sad as it makes debugging seccomp filter policies impossible on some architectures (at least ARM and PowerPC, maybe also others) which do not coincidentally set si_value.sival_int as the syscall number. To fix this, import the definitions and macros needed from glibc. Signed-off-by: Daniel Golle Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/ia64/bits/siginfo.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libc/sysdeps/linux/ia64/bits') diff --git a/libc/sysdeps/linux/ia64/bits/siginfo.h b/libc/sysdeps/linux/ia64/bits/siginfo.h index 3ac988baf..df18b3606 100644 --- a/libc/sysdeps/linux/ia64/bits/siginfo.h +++ b/libc/sysdeps/linux/ia64/bits/siginfo.h @@ -102,6 +102,14 @@ typedef struct siginfo long int si_band; /* Band event for SIGPOLL. */ int si_fd; } _sigpoll; + + /* SIGSYS. */ + struct + { + void *_call_addr; /* Calling user insn. */ + int _syscall; /* Triggering system call number. */ + unsigned int _arch; /* AUDIT_ARCH_* of syscall. */ + } _sigsys; } _sifields; } siginfo_t; @@ -120,6 +128,9 @@ typedef struct siginfo # define si_addr _sifields._sigfault.si_addr # define si_band _sifields._sigpoll.si_band # define si_fd _sifields._sigpoll.si_fd +# define si_call_addr _sifields._sigsys._call_addr +# define si_syscall _sifields._sigsys._syscall +# define si_arch _sifields._sigsys._arch # ifdef __USE_GNU # define si_imm _sifields._sigfault._si_imm -- cgit v1.2.3