]> granicus.if.org Git - strace/commitdiff
print_seccomp_*: change address argument type from unsigned long to kernel_ureg_t
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 20 Dec 2016 22:54:53 +0000 (22:54 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 23 Dec 2016 19:26:57 +0000 (19:26 +0000)
* defs.h (print_seccomp_filter, print_seccomp_fprog): Change
address argument type from unsigned long to kernel_ureg_t.
* seccomp.c (print_seccomp_filter, print_seccomp_fprog,
decode_seccomp_set_mode_strict): Likewise.

defs.h
seccomp.c

diff --git a/defs.h b/defs.h
index 03788c7cd51faa98c83c238ed9bb1447d9ab630d..238004154381e48461dd510087e517eead3b2658 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -665,8 +665,12 @@ tprint_iov_upto(struct tcb *, unsigned long len, kernel_ureg_t addr,
 extern void decode_netlink(struct tcb *, unsigned long, unsigned long);
 extern void tprint_open_modes(unsigned int);
 extern const char *sprint_open_modes(unsigned int);
-extern void print_seccomp_filter(struct tcb *, unsigned long);
-extern void print_seccomp_fprog(struct tcb *, unsigned long, unsigned short);
+
+extern void
+print_seccomp_filter(struct tcb *, kernel_ureg_t addr);
+
+extern void
+print_seccomp_fprog(struct tcb *, kernel_ureg_t addr, unsigned short len);
 
 struct strace_stat;
 extern void print_struct_stat(struct tcb *tcp, const struct strace_stat *const st);
index 4d8d7e4b2503383cf0024c12548cb264e52d4e36..811b27107d1a0f8ac0080adcfe5a2003576d0fb5 100644 (file)
--- a/seccomp.c
+++ b/seccomp.c
@@ -172,7 +172,8 @@ print_bpf_filter(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
 }
 
 void
-print_seccomp_fprog(struct tcb *tcp, unsigned long addr, unsigned short len)
+print_seccomp_fprog(struct tcb *const tcp, const kernel_ureg_t addr,
+                   const unsigned short len)
 {
        if (abbrev(tcp)) {
                printaddr(addr);
@@ -188,7 +189,7 @@ print_seccomp_fprog(struct tcb *tcp, unsigned long addr, unsigned short len)
 #include "seccomp_fprog.h"
 
 void
-print_seccomp_filter(struct tcb *tcp, unsigned long addr)
+print_seccomp_filter(struct tcb *const tcp, const kernel_ureg_t addr)
 {
        struct seccomp_fprog fprog;
 
@@ -200,7 +201,8 @@ print_seccomp_filter(struct tcb *tcp, unsigned long addr)
 }
 
 static void
-decode_seccomp_set_mode_strict(unsigned int flags, unsigned long addr)
+decode_seccomp_set_mode_strict(const unsigned int flags,
+                              const kernel_ureg_t addr)
 {
        tprintf("%u, ", flags);
        printaddr(addr);