return true;
}
-static void
-print_seccomp_fprog(struct tcb *tcp, unsigned long addr, unsigned short len)
+void
+print_seccomp_fprog(struct tcb *const tcp, const kernel_ulong_t addr,
+ const unsigned short len)
{
- tprintf("{len=%u, filter=", len);
-
if (abbrev(tcp)) {
printaddr(addr);
} else {
print_array(tcp, addr, len, &filter, sizeof(filter),
umoven_or_printaddr, print_bpf_filter, &insns);
}
-
- tprints("}");
}
#include "seccomp_fprog.h"
void
-print_seccomp_filter(struct tcb *tcp, unsigned long addr)
+print_seccomp_filter(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct seccomp_fprog fprog;
- if (fetch_seccomp_fprog(tcp, addr, &fprog))
+ if (fetch_seccomp_fprog(tcp, addr, &fprog)) {
+ tprintf("{len=%hu, filter=", fprog.len);
print_seccomp_fprog(tcp, fprog.filter, fprog.len);
+ tprints("}");
+ }
}
static void
-decode_seccomp_set_mode_strict(unsigned int flags, unsigned long addr)
+decode_seccomp_set_mode_strict(const unsigned int flags,
+ const kernel_ulong_t addr)
{
tprintf("%u, ", flags);
printaddr(addr);