summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/mips/bits/siginfo.h
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2015-05-17 22:49:23 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2015-06-10 10:18:54 -0500
commit90edbb4e01e8a65ae7415af88bd194cea1aa0520 (patch)
treed75e7d3a297a710ae7453dbb195cd393c2972bf2 /libc/sysdeps/linux/mips/bits/siginfo.h
parenta7f7831ec0914f471883c1dfe494a3e68557b56f (diff)
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 <daniel@makrotopia.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/mips/bits/siginfo.h')
-rw-r--r--libc/sysdeps/linux/mips/bits/siginfo.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/mips/bits/siginfo.h b/libc/sysdeps/linux/mips/bits/siginfo.h
index 5199d4d99..b204301af 100644
--- a/libc/sysdeps/linux/mips/bits/siginfo.h
+++ b/libc/sysdeps/linux/mips/bits/siginfo.h
@@ -108,6 +108,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;
@@ -127,6 +135,9 @@ typedef struct siginfo
# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# 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
/* Values for `si_code'. Positive values are reserved for kernel-generated