From fde482b82eb49bb0314e67b9851519cca37769a0 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 20 Dec 2016 22:54:53 +0000 Subject: [PATCH] print_seccomp_*: change address argument type from unsigned long to kernel_ureg_t * 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 | 8 ++++++-- seccomp.c | 8 +++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/defs.h b/defs.h index 03788c7c..23800415 100644 --- 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); diff --git a/seccomp.c b/seccomp.c index 4d8d7e4b..811b2710 100644 --- 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); -- 2.40.0