]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Linux: Add missing si_code constants from Linux kernel
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Thu, 4 Sep 2025 02:26:21 +0000 (23:26 -0300)
committerCarlos O'Donell <carlos@redhat.com>
Mon, 8 Sep 2025 18:12:47 +0000 (14:12 -0400)
This brings the si_codes listed in siginfo-consts.h up-to-date with
Linux v6.16's include/uapi/asm-generic/siginfo.h.

Tested on aarch64-linux-gnu and x86_64-linux-gnu.

Suggested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
sysdeps/unix/sysv/linux/bits/siginfo-consts.h

index fd38bb3147f7534f0ec1725eac70360bb8492478..4ce88aef304b5ae3ee8bb5c179dcb14f5d5deb53 100644 (file)
@@ -168,8 +168,10 @@ enum
 #  define TRAP_BRANCH  TRAP_BRANCH
   TRAP_HWBKPT,                 /* Hardware breakpoint/watchpoint.  */
 #  define TRAP_HWBKPT  TRAP_HWBKPT
-  TRAP_UNK                     /* Undiagnosed trap.  */
+  TRAP_UNK,                    /* Undiagnosed trap.  */
 #  define TRAP_UNK     TRAP_UNK
+  TRAP_PERF                    /* Perf event with sigtrap=1.  */
+#  define TRAP_PERF    TRAP_PERF
 };
 # endif
 
@@ -209,6 +211,18 @@ enum
 };
 # endif
 
+/* The Linux-specific SIGSYS values are all considered GNU extensions.  */
+#ifdef __USE_GNU
+/* `si_code' values for SIGSYS signal.  */
+enum
+{
+  SYS_SECCOMP = 1,             /* Seccomp triggered.  */
+#  define SYS_SECCOMP  SYS_SECCOMP
+  SYS_USER_DISPATCH                    /* Syscall user dispatch triggered.  */
+#  define SYS_USER_DISPATCH    SYS_USER_DISPATCH
+};
+#endif
+
 /* Architectures might also add architecture-specific constants.
    These are all considered GNU extensions.  */
 #ifdef __USE_GNU