The branch stable/13 has been updated by dchagin:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4ec7625e663ac9342b287985cb4ad228dc0be9e8

commit 4ec7625e663ac9342b287985cb4ad228dc0be9e8
Author:     Dmitry Chagin <[email protected]>
AuthorDate: 2022-06-22 11:20:39 +0000
Commit:     Dmitry Chagin <[email protected]>
CommitDate: 2022-07-06 11:02:14 +0000

    kdump: Decode Linux sigprocmask how argument
    
    MFC after:              2 weeks
    
    (cherry picked from commit f587a2a765fb3bac352bedf6ef8b322eb3363339)
---
 lib/libsysdecode/linux.c       |  7 +++++++
 lib/libsysdecode/mklinuxtables |  1 +
 lib/libsysdecode/sysdecode.h   |  1 +
 usr.bin/kdump/linux.c          | 18 ++++++++++++++++++
 4 files changed, 27 insertions(+)

diff --git a/lib/libsysdecode/linux.c b/lib/libsysdecode/linux.c
index 6a8d30207835..adaf6172618d 100644
--- a/lib/libsysdecode/linux.c
+++ b/lib/libsysdecode/linux.c
@@ -183,3 +183,10 @@ sysdecode_linux_signal(int sig)
                return (linux_signames[sig]);
        return (NULL);
 }
+
+const char *
+sysdecode_linux_sigprocmask_how(int how)
+{
+
+       return (lookup_value(sigprocmaskhow, how));
+}
diff --git a/lib/libsysdecode/mklinuxtables b/lib/libsysdecode/mklinuxtables
index 62f0d9329c94..efd579adff35 100644
--- a/lib/libsysdecode/mklinuxtables
+++ b/lib/libsysdecode/mklinuxtables
@@ -90,6 +90,7 @@ _EOF_
 
 gen_table "clockids"    "LINUX_CLOCK_[A-Z_]+[[:space:]]+[0-9]+"          
"compat/linux/linux_timer.h"
 gen_table "clockcpuids" "LINUX_CPUCLOCK_[A-Z_]+[[:space:]]+[0-9]+"       
"compat/linux/linux_timer.h"  "_MASK|_MAX"
+gen_table "sigprocmaskhow" "LINUX_SIG_[A-Z]+[[:space:]]+[0-9]+"          
"compat/linux/linux.h"
 
 # Generate a .depend file for our output file
 if [ -n "$output_file" ]; then
diff --git a/lib/libsysdecode/sysdecode.h b/lib/libsysdecode/sysdecode.h
index f588319fbf17..dd765d28d870 100644
--- a/lib/libsysdecode/sysdecode.h
+++ b/lib/libsysdecode/sysdecode.h
@@ -143,6 +143,7 @@ bool        sysdecode_shmflags(FILE *_fp, int _flags, int 
*_rem);
 
 void   sysdecode_linux_clockid(FILE *_fp, clockid_t _which);
 const char *sysdecode_linux_signal(int _sig);
+const char *sysdecode_linux_sigprocmask_how(int _how);
 
 #endif /* __i386__ || __amd64__ || __aarch64__ */
 
diff --git a/usr.bin/kdump/linux.c b/usr.bin/kdump/linux.c
index 55b3df912898..f55d0b7da83d 100644
--- a/usr.bin/kdump/linux.c
+++ b/usr.bin/kdump/linux.c
@@ -125,6 +125,16 @@ ktrsyscall_linux(struct ktr_syscall *ktr, register_t 
**resip,
                narg--;
                c = ',';
                break;
+       case LINUX_SYS_linux_rt_sigprocmask:
+#ifdef LINUX_SYS_linux_sigprocmask
+       case LINUX_SYS_linux_sigprocmask:
+#endif
+               putchar('(');
+               print_integer_arg(sysdecode_linux_sigprocmask_how, *ip);
+               ip++;
+               narg--;
+               c = ',';
+               break;
        }
        *resc = c;
        *resip = ip;
@@ -199,6 +209,14 @@ ktrsyscall_linux32(struct ktr_syscall *ktr, register_t 
**resip,
                narg--;
                c = ',';
                break;
+       case LINUX32_SYS_linux_rt_sigprocmask:
+       case LINUX32_SYS_linux_sigprocmask:
+               putchar('(');
+               print_integer_arg(sysdecode_linux_sigprocmask_how, *ip);
+               ip++;
+               narg--;
+               c = ',';
+               break;
        }
        *resc = c;
        *resip = ip;

Reply via email to