Automatically replace kernel_(scno|ureg)_t with kernel_ulong_t

Remove temporary types created for transition from long
to kernel_ulong_t.

Automatically replace kernel_scno_t and kernel_ureg_t with
kernel_ulong_t using
$ git grep -El 'kernel_(scno|ureg)_t' |
  xargs sed -ri 's/kernel_(scno|ureg)_t/kernel_ulong_t/g'

* kernel_types.h (kernel_scno_t, kernel_ureg_t): Remove.
All users updated.
This commit is contained in:
Дмитрий Левин 2016-12-26 10:26:03 +00:00
parent e625443bb5
commit 7fa3d78319
119 changed files with 430 additions and 433 deletions

View File

@ -61,7 +61,7 @@ get_cpuset_size(void)
}
static void
print_affinitylist(struct tcb *const tcp, const kernel_ureg_t addr,
print_affinitylist(struct tcb *const tcp, const kernel_ulong_t addr,
const unsigned int len)
{
const unsigned int max_size = get_cpuset_size();

10
aio.c
View File

@ -161,13 +161,13 @@ print_iocb(struct tcb *tcp, const struct iocb *cb)
static bool
print_iocbp(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
{
kernel_ureg_t addr;
kernel_ulong_t addr;
struct iocb cb;
if (elem_size < sizeof(kernel_ureg_t)) {
if (elem_size < sizeof(kernel_ulong_t)) {
addr = * (unsigned int *) elem_buf;
} else {
addr = * (kernel_ureg_t *) elem_buf;
addr = * (kernel_ulong_t *) elem_buf;
}
tprints("{");
@ -181,8 +181,8 @@ print_iocbp(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
SYS_FUNC(io_submit)
{
const long nr = widen_to_long(tcp->u_arg[1]);
const kernel_ureg_t addr = tcp->u_arg[2];
kernel_ureg_t iocbp;
const kernel_ulong_t addr = tcp->u_arg[2];
kernel_ulong_t iocbp;
printaddr(tcp->u_arg[0]);
tprintf(", %ld, ", nr);

View File

@ -144,7 +144,7 @@ print_blkpg_req(struct tcb *tcp, const struct_blkpg_ioctl_arg *blkpg)
}
MPERS_PRINTER_DECL(int, block_ioctl, struct tcb *const tcp,
const unsigned int code, const kernel_ureg_t arg)
const unsigned int code, const kernel_ulong_t arg)
{
switch (code) {
/* take arg as a value, not as a pointer */

12
bpf.c
View File

@ -37,7 +37,7 @@
#include "xlat/bpf_map_update_elem_flags.h"
static int
bpf_map_create(struct tcb *const tcp, const kernel_ureg_t addr,
bpf_map_create(struct tcb *const tcp, const kernel_ulong_t addr,
unsigned int size)
{
struct {
@ -62,7 +62,7 @@ bpf_map_create(struct tcb *const tcp, const kernel_ureg_t addr,
}
static void
bpf_map_update_elem(struct tcb *const tcp, const kernel_ureg_t addr,
bpf_map_update_elem(struct tcb *const tcp, const kernel_ulong_t addr,
unsigned int size)
{
struct {
@ -90,7 +90,7 @@ bpf_map_update_elem(struct tcb *const tcp, const kernel_ureg_t addr,
}
static void
bpf_map_delete_elem(struct tcb *const tcp, const kernel_ureg_t addr,
bpf_map_delete_elem(struct tcb *const tcp, const kernel_ulong_t addr,
unsigned int size)
{
struct {
@ -113,7 +113,7 @@ bpf_map_delete_elem(struct tcb *const tcp, const kernel_ureg_t addr,
}
static int
bpf_map_io(struct tcb *const tcp, const kernel_ureg_t addr, unsigned int size,
bpf_map_io(struct tcb *const tcp, const kernel_ulong_t addr, unsigned int size,
const char *const text)
{
struct bpf_io_elem_struct {
@ -146,7 +146,7 @@ bpf_map_io(struct tcb *const tcp, const kernel_ureg_t addr, unsigned int size,
}
static int
bpf_prog_load(struct tcb *const tcp, const kernel_ureg_t addr,
bpf_prog_load(struct tcb *const tcp, const kernel_ulong_t addr,
unsigned int size)
{
struct {
@ -180,7 +180,7 @@ bpf_prog_load(struct tcb *const tcp, const kernel_ureg_t addr,
SYS_FUNC(bpf)
{
const unsigned int cmd = tcp->u_arg[0];
const kernel_ureg_t addr = tcp->u_arg[1];
const kernel_ulong_t addr = tcp->u_arg[1];
const unsigned int size = tcp->u_arg[2];
int rc = RVAL_DECODED;

View File

@ -204,7 +204,7 @@ btrfs_print_balance_args(const char *name, const struct btrfs_balance_args *bba)
}
static void
btrfs_print_balance(struct tcb *const tcp, const kernel_ureg_t arg, bool out)
btrfs_print_balance(struct tcb *const tcp, const kernel_ulong_t arg, bool out)
{
struct btrfs_ioctl_balance_args balance_args;
@ -376,7 +376,7 @@ print_uint64(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
}
static void
btrfs_print_qgroup_inherit(struct tcb *const tcp, const kernel_ureg_t qgi_addr)
btrfs_print_qgroup_inherit(struct tcb *const tcp, const kernel_ulong_t qgi_addr)
{
struct btrfs_qgroup_inherit inherit;
@ -513,7 +513,7 @@ print_btrfs_ioctl_space_info(struct tcb *tcp, void *elem_buf,
MPERS_PRINTER_DECL(int, btrfs_ioctl,
struct tcb *const tcp, const unsigned int code,
const kernel_ureg_t arg)
const kernel_ulong_t arg)
{
switch (code) {
/* Take no arguments; command only. */

View File

@ -64,7 +64,7 @@ typedef struct user_cap_data_struct {
} *cap_user_data_t;
static cap_user_header_t
get_cap_header(struct tcb *const tcp, const kernel_ureg_t addr)
get_cap_header(struct tcb *const tcp, const kernel_ulong_t addr)
{
static struct user_cap_header_struct header;
@ -78,7 +78,7 @@ get_cap_header(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
print_cap_header(struct tcb *const tcp, const kernel_ureg_t addr,
print_cap_header(struct tcb *const tcp, const kernel_ulong_t addr,
const cap_user_header_t const h)
{
if (!addr || !h) {
@ -106,7 +106,7 @@ print_cap_bits(const uint32_t lo, const uint32_t hi)
}
static void
print_cap_data(struct tcb *const tcp, const kernel_ureg_t addr,
print_cap_data(struct tcb *const tcp, const kernel_ulong_t addr,
const cap_user_header_t const h)
{
struct user_cap_data_struct data[2];

View File

@ -76,7 +76,7 @@
#endif
static void
print_tls_arg(struct tcb *const tcp, const kernel_ureg_t addr)
print_tls_arg(struct tcb *const tcp, const kernel_ulong_t addr)
{
#ifdef HAVE_STRUCT_USER_DESC
# if SUPPORTED_PERSONALITIES > 1
@ -98,7 +98,7 @@ SYS_FUNC(clone)
{
if (exiting(tcp)) {
const char *sep = "|";
kernel_ureg_t flags = tcp->u_arg[ARG_FLAGS];
kernel_ulong_t flags = tcp->u_arg[ARG_FLAGS];
tprints("child_stack=");
printaddr(tcp->u_arg[ARG_STACK]);
tprints(", ");

90
defs.h
View File

@ -232,8 +232,8 @@ struct tcb {
int pid; /* If 0, this tcb is free */
int qual_flg; /* qual_flags[scno] or DEFAULT_QUAL_FLAGS + RAW */
unsigned long u_error; /* Error code */
kernel_scno_t scno; /* System call number */
kernel_ureg_t u_arg[MAX_ARGS]; /* System call arguments */
kernel_ulong_t scno; /* System call number */
kernel_ulong_t u_arg[MAX_ARGS]; /* System call arguments */
#if HAVE_STRUCT_TCB_EXT_ARG
unsigned long long ext_arg[MAX_ARGS];
long long u_lrval; /* long long return value */
@ -471,7 +471,7 @@ extern int get_scno(struct tcb *tcp);
* @return String literal corresponding to the syscall number in case latter
* is valid; NULL otherwise.
*/
extern const char *syscall_name(kernel_scno_t scno);
extern const char *syscall_name(kernel_ulong_t scno);
extern const char *err_name(unsigned long err);
extern bool is_erestart(struct tcb *);
@ -494,34 +494,34 @@ static inline int set_tcb_priv_ulong(struct tcb *tcp, unsigned long val)
}
extern int
umoven(struct tcb *tcp, kernel_ureg_t addr, unsigned int len, void *laddr);
umoven(struct tcb *tcp, kernel_ulong_t addr, unsigned int len, void *laddr);
#define umove(pid, addr, objp) \
umoven((pid), (addr), sizeof(*(objp)), (void *) (objp))
extern int
umoven_or_printaddr(struct tcb *tcp, kernel_ureg_t addr,
umoven_or_printaddr(struct tcb *tcp, kernel_ulong_t addr,
unsigned int len, void *laddr);
#define umove_or_printaddr(pid, addr, objp) \
umoven_or_printaddr((pid), (addr), sizeof(*(objp)), (void *) (objp))
extern int
umoven_or_printaddr_ignore_syserror(struct tcb *tcp, kernel_ureg_t addr,
umoven_or_printaddr_ignore_syserror(struct tcb *tcp, kernel_ulong_t addr,
unsigned int len, void *laddr);
extern int
umovestr(struct tcb *tcp, kernel_ureg_t addr, unsigned int len, char *laddr);
umovestr(struct tcb *tcp, kernel_ulong_t addr, unsigned int len, char *laddr);
extern int upeek(int pid, unsigned long, kernel_ureg_t *);
extern int upoke(int pid, unsigned long, kernel_ureg_t);
extern int upeek(int pid, unsigned long, kernel_ulong_t *);
extern int upoke(int pid, unsigned long, kernel_ulong_t);
extern bool
print_array(struct tcb *tcp,
kernel_ureg_t start_addr,
kernel_ulong_t start_addr,
size_t nmemb,
void *elem_buf,
size_t elem_size,
int (*umoven_func)(struct tcb *,
kernel_ureg_t,
kernel_ulong_t,
unsigned int,
void *),
bool (*print_func)(struct tcb *,
@ -601,24 +601,24 @@ extern void print_numeric_umode_t(unsigned short);
extern void print_numeric_long_umask(unsigned long);
extern void
dumpiov_in_msghdr(struct tcb *, kernel_ureg_t addr, kernel_ureg_t data_size);
dumpiov_in_msghdr(struct tcb *, kernel_ulong_t addr, kernel_ulong_t data_size);
extern void
dumpiov_in_mmsghdr(struct tcb *, kernel_ureg_t addr);
dumpiov_in_mmsghdr(struct tcb *, kernel_ulong_t addr);
extern void
dumpiov_upto(struct tcb *, int len, kernel_ureg_t addr, kernel_ureg_t data_size);
dumpiov_upto(struct tcb *, int len, kernel_ulong_t addr, kernel_ulong_t data_size);
extern void
dumpstr(struct tcb *, kernel_ureg_t addr, int len);
dumpstr(struct tcb *, kernel_ulong_t addr, int len);
extern void
printstr_ex(struct tcb *, kernel_ureg_t addr, kernel_ureg_t len,
printstr_ex(struct tcb *, kernel_ulong_t addr, kernel_ulong_t len,
unsigned int user_style);
#define DECL_PRINTNUM(name) \
extern bool \
printnum_ ## name(struct tcb *, kernel_ureg_t addr, const char *fmt) \
printnum_ ## name(struct tcb *, kernel_ulong_t addr, const char *fmt) \
ATTRIBUTE_FORMAT((printf, 3, 0))
DECL_PRINTNUM(short);
DECL_PRINTNUM(int);
@ -627,7 +627,7 @@ DECL_PRINTNUM(int64);
#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4
extern bool
printnum_long_int(struct tcb *, kernel_ureg_t addr,
printnum_long_int(struct tcb *, kernel_ulong_t addr,
const char *fmt_long, const char *fmt_int)
ATTRIBUTE_FORMAT((printf, 3, 0))
ATTRIBUTE_FORMAT((printf, 4, 0));
@ -655,17 +655,17 @@ printnum_long_int(struct tcb *, kernel_ureg_t addr,
#define DECL_PRINTPAIR(name) \
extern bool \
printpair_ ## name(struct tcb *, kernel_ureg_t addr, const char *fmt) \
printpair_ ## name(struct tcb *, kernel_ulong_t addr, const char *fmt) \
ATTRIBUTE_FORMAT((printf, 3, 0))
DECL_PRINTPAIR(int);
DECL_PRINTPAIR(int64);
#undef DECL_PRINTPAIR
extern void
printpathn(struct tcb *, kernel_ureg_t addr, unsigned int n);
printpathn(struct tcb *, kernel_ulong_t addr, unsigned int n);
extern void
printpath(struct tcb *, kernel_ureg_t addr);
printpath(struct tcb *, kernel_ulong_t addr);
#define TIMESPEC_TEXT_BUFSIZE \
(sizeof(intmax_t)*3 * 2 + sizeof("{tv_sec=%jd, tv_nsec=%jd}"))
@ -676,12 +676,12 @@ extern bool print_sockaddr_by_inode_cached(const unsigned long);
extern void print_dirfd(struct tcb *, int);
extern int
decode_sockaddr(struct tcb *, kernel_ureg_t addr, int addrlen);
decode_sockaddr(struct tcb *, kernel_ulong_t addr, int addrlen);
extern void printuid(const char *, const unsigned int);
extern void
print_sigset_addr_len(struct tcb *, kernel_ureg_t addr, kernel_ureg_t len);
print_sigset_addr_len(struct tcb *, kernel_ulong_t addr, kernel_ulong_t len);
extern const char *sprintsigmask_n(const char *, const void *, unsigned int);
#define tprintsigmask_addr(prefix, mask) \
@ -689,20 +689,20 @@ extern const char *sprintsigmask_n(const char *, const void *, unsigned int);
extern void printsignal(int);
extern void
tprint_iov_upto(struct tcb *, kernel_ureg_t len, kernel_ureg_t addr,
enum iov_decode, kernel_ureg_t data_size);
tprint_iov_upto(struct tcb *, kernel_ulong_t len, kernel_ulong_t addr,
enum iov_decode, kernel_ulong_t data_size);
extern void
decode_netlink(struct tcb *, kernel_ureg_t addr, kernel_ureg_t len);
decode_netlink(struct tcb *, kernel_ulong_t addr, kernel_ulong_t len);
extern void tprint_open_modes(unsigned int);
extern const char *sprint_open_modes(unsigned int);
extern void
print_seccomp_filter(struct tcb *, kernel_ureg_t addr);
print_seccomp_filter(struct tcb *, kernel_ulong_t addr);
extern void
print_seccomp_fprog(struct tcb *, kernel_ureg_t addr, unsigned short len);
print_seccomp_fprog(struct tcb *, kernel_ulong_t addr, unsigned short len);
struct strace_stat;
extern void print_struct_stat(struct tcb *tcp, const struct strace_stat *const st);
@ -710,10 +710,10 @@ extern void print_struct_stat(struct tcb *tcp, const struct strace_stat *const s
struct strace_statfs;
extern void
print_struct_statfs(struct tcb *, kernel_ureg_t addr);
print_struct_statfs(struct tcb *, kernel_ulong_t addr);
extern void
print_struct_statfs64(struct tcb *, kernel_ureg_t addr, kernel_ureg_t size);
print_struct_statfs64(struct tcb *, kernel_ulong_t addr, kernel_ulong_t size);
extern void print_ifindex(unsigned int);
@ -728,7 +728,7 @@ extern unsigned int qual_flags(const unsigned int);
#define DECL_IOCTL(name) \
extern int \
name ## _ioctl(struct tcb *, unsigned int request, kernel_ureg_t arg)
name ## _ioctl(struct tcb *, unsigned int request, kernel_ulong_t arg)
DECL_IOCTL(dm);
DECL_IOCTL(file);
DECL_IOCTL(fs_x);
@ -759,19 +759,19 @@ extern void unwind_capture_stacktrace(struct tcb* tcp);
#endif
static inline void
printaddr(kernel_ureg_t addr)
printaddr(kernel_ulong_t addr)
{
printaddr_klu(addr);
}
static inline void
printstrn(struct tcb *tcp, kernel_ureg_t addr, kernel_ureg_t len)
printstrn(struct tcb *tcp, kernel_ulong_t addr, kernel_ulong_t len)
{
printstr_ex(tcp, addr, len, 0);
}
static inline void
printstr(struct tcb *tcp, kernel_ureg_t addr)
printstr(struct tcb *tcp, kernel_ulong_t addr)
{
printstr_ex(tcp, addr, -1, QUOTE_0_TERMINATED);
}
@ -795,7 +795,7 @@ printxval(const struct xlat *x, const unsigned int val, const char *dflt)
}
static inline void
tprint_iov(struct tcb *tcp, kernel_ureg_t len, kernel_ureg_t addr,
tprint_iov(struct tcb *tcp, kernel_ulong_t len, kernel_ulong_t addr,
enum iov_decode decode_iov)
{
tprint_iov_upto(tcp, len, addr, decode_iov, -1);
@ -807,15 +807,15 @@ typedef struct {
} timeval32_t;
extern void print_timeval32_t(const timeval32_t *);
extern void printrusage32(struct tcb *, kernel_ureg_t);
extern const char *sprint_timeval32(struct tcb *tcp, kernel_ureg_t);
extern void print_timeval32(struct tcb *tcp, kernel_ureg_t);
extern void print_timeval32_pair(struct tcb *tcp, kernel_ureg_t);
extern void print_itimerval32(struct tcb *tcp, kernel_ureg_t);
extern void printrusage32(struct tcb *, kernel_ulong_t);
extern const char *sprint_timeval32(struct tcb *tcp, kernel_ulong_t);
extern void print_timeval32(struct tcb *tcp, kernel_ulong_t);
extern void print_timeval32_pair(struct tcb *tcp, kernel_ulong_t);
extern void print_itimerval32(struct tcb *tcp, kernel_ulong_t);
#endif
#ifdef HAVE_STRUCT_USER_DESC
extern void print_user_desc(struct tcb *, kernel_ureg_t addr);
extern void print_user_desc(struct tcb *, kernel_ulong_t addr);
#endif
/* Strace log generation machinery.
@ -885,9 +885,9 @@ extern unsigned current_klongsize;
#endif
/*
* Cast a pointer or a pointer-sized integer to kernel_ureg_t.
* Cast a pointer or a pointer-sized integer to kernel_ulong_t.
*/
#define ptr_to_kulong(v) ((kernel_ureg_t) (unsigned long) (v))
#define ptr_to_kulong(v) ((kernel_ulong_t) (unsigned long) (v))
/*
* Zero-extend a signed integer type to unsigned long long.
@ -949,7 +949,7 @@ extern struct fault_opts *fault_vec[SUPPORTED_PERSONALITIES];
/* Checks that sysent[scno] is not out of range. */
static inline bool
scno_in_range(kernel_scno_t scno)
scno_in_range(kernel_ulong_t scno)
{
return scno < nsyscalls;
}
@ -960,7 +960,7 @@ scno_in_range(kernel_scno_t scno)
* and its sysent[scno].sys_flags has no TRACE_INDIRECT_SUBCALL flag set.
*/
static inline bool
scno_is_valid(kernel_scno_t scno)
scno_is_valid(kernel_ulong_t scno)
{
return scno_in_range(scno)
&& sysent[scno].sys_func

12
desc.c
View File

@ -69,15 +69,15 @@ SYS_FUNC(dup3)
}
static int
decode_select(struct tcb *const tcp, const kernel_ureg_t *const args,
void (*const print_tv_ts) (struct tcb *, kernel_ureg_t),
const char * (*const sprint_tv_ts) (struct tcb *, kernel_ureg_t))
decode_select(struct tcb *const tcp, const kernel_ulong_t *const args,
void (*const print_tv_ts) (struct tcb *, kernel_ulong_t),
const char * (*const sprint_tv_ts) (struct tcb *, kernel_ulong_t))
{
int i, j;
int nfds, fdsize;
fd_set *fds = NULL;
const char *sep;
kernel_ureg_t addr;
kernel_ulong_t addr;
/* Kernel truncates args[0] to int, we do the same. */
nfds = (int) args[0];
@ -192,7 +192,7 @@ decode_select(struct tcb *const tcp, const kernel_ureg_t *const args,
SYS_FUNC(oldselect)
{
kernel_ureg_t select_args[5];
kernel_ulong_t select_args[5];
unsigned int oldselect_args[5];
if (sizeof(*select_args) == sizeof(*oldselect_args)) {
@ -227,7 +227,7 @@ SYS_FUNC(select)
}
static int
umove_kulong_array_or_printaddr(struct tcb *const tcp, const kernel_ureg_t addr,
umove_kulong_array_or_printaddr(struct tcb *const tcp, const kernel_ulong_t addr,
kernel_ulong_t *const ptr, const size_t n)
{
#ifndef current_klongsize

View File

@ -38,7 +38,7 @@
#define D_NAME_LEN_MAX 256
static void
print_old_dirent(struct tcb *const tcp, const kernel_ureg_t addr)
print_old_dirent(struct tcb *const tcp, const kernel_ulong_t addr)
{
kernel_dirent d;

18
dm.c
View File

@ -102,7 +102,7 @@ dm_decode_flags(const struct dm_ioctl *ioc)
}
static void
dm_decode_dm_target_spec(struct tcb *const tcp, const kernel_ureg_t addr,
dm_decode_dm_target_spec(struct tcb *const tcp, const kernel_ulong_t addr,
const struct dm_ioctl *const ioc)
{
static const uint32_t target_spec_size =
@ -177,7 +177,7 @@ dm_print_dev(struct tcb *tcp, void *dev_ptr, size_t dev_size, void *dummy)
}
static void
dm_decode_dm_target_deps(struct tcb *const tcp, const kernel_ureg_t addr,
dm_decode_dm_target_deps(struct tcb *const tcp, const kernel_ulong_t addr,
const struct dm_ioctl *const ioc)
{
static const uint32_t target_deps_dev_offs =
@ -220,7 +220,7 @@ misplaced:
}
static void
dm_decode_dm_name_list(struct tcb *const tcp, const kernel_ureg_t addr,
dm_decode_dm_name_list(struct tcb *const tcp, const kernel_ulong_t addr,
const struct dm_ioctl *const ioc)
{
static const uint32_t name_list_name_offs =
@ -276,7 +276,7 @@ misplaced:
}
static void
dm_decode_dm_target_versions(struct tcb *const tcp, const kernel_ureg_t addr,
dm_decode_dm_target_versions(struct tcb *const tcp, const kernel_ulong_t addr,
const struct dm_ioctl *const ioc)
{
static const uint32_t target_vers_name_offs =
@ -328,7 +328,7 @@ misplaced:
}
static void
dm_decode_dm_target_msg(struct tcb *const tcp, const kernel_ureg_t addr,
dm_decode_dm_target_msg(struct tcb *const tcp, const kernel_ulong_t addr,
const struct dm_ioctl *const ioc)
{
static const uint32_t target_msg_message_offs =
@ -359,7 +359,7 @@ dm_decode_dm_target_msg(struct tcb *const tcp, const kernel_ureg_t addr,
}
static void
dm_decode_string(struct tcb *const tcp, const kernel_ureg_t addr,
dm_decode_string(struct tcb *const tcp, const kernel_ulong_t addr,
const struct dm_ioctl *const ioc)
{
uint32_t offset = ioc->data_start;
@ -397,7 +397,7 @@ dm_ioctl_has_params(const unsigned int code)
static int
dm_known_ioctl(struct tcb *const tcp, const unsigned int code,
const kernel_ureg_t arg)
const kernel_ulong_t arg)
{
struct dm_ioctl *ioc = NULL;
struct dm_ioctl *entering_ioc = NULL;
@ -517,7 +517,7 @@ dm_known_ioctl(struct tcb *const tcp, const unsigned int code,
}
int
dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ureg_t arg)
dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg)
{
switch (code) {
case DM_VERSION:
@ -545,7 +545,7 @@ dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ureg_t arg
# else /* !(DM_VERSION_MAJOR == 4) */
int
dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ureg_t arg)
dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg)
{
return 0;
}

26
evdev.c
View File

@ -76,7 +76,7 @@ decode_envelope(void *const data)
}
static int
ff_effect_ioctl(struct tcb *const tcp, const kernel_ureg_t arg)
ff_effect_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
{
tprints(", ");
@ -154,7 +154,7 @@ ff_effect_ioctl(struct tcb *const tcp, const kernel_ureg_t arg)
}
static int
abs_ioctl(struct tcb *const tcp, const kernel_ureg_t arg)
abs_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
{
tprints(", ");
@ -188,7 +188,7 @@ abs_ioctl(struct tcb *const tcp, const kernel_ureg_t arg)
}
static int
keycode_ioctl(struct tcb *const tcp, const kernel_ureg_t arg)
keycode_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
{
tprints(", ");
@ -205,7 +205,7 @@ keycode_ioctl(struct tcb *const tcp, const kernel_ureg_t arg)
# ifdef EVIOCGKEYCODE_V2
static int
keycode_V2_ioctl(struct tcb *const tcp, const kernel_ureg_t arg)
keycode_V2_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
{
tprints(", ");
@ -242,7 +242,7 @@ keycode_V2_ioctl(struct tcb *const tcp, const kernel_ureg_t arg)
# endif /* EVIOCGKEYCODE_V2 */
static int
getid_ioctl(struct tcb *const tcp, const kernel_ureg_t arg)
getid_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
{
tprints(", ");
@ -262,14 +262,14 @@ getid_ioctl(struct tcb *const tcp, const kernel_ureg_t arg)
}
static int
decode_bitset(struct tcb *const tcp, const kernel_ureg_t arg,
decode_bitset(struct tcb *const tcp, const kernel_ulong_t arg,
const struct xlat decode_nr[], const unsigned int max_nr,
const char *const dflt)
{
tprints(", ");
unsigned int size;
if ((kernel_ureg_t) tcp->u_rval > max_nr)
if ((kernel_ulong_t) tcp->u_rval > max_nr)
size = max_nr;
else
size = tcp->u_rval;
@ -306,7 +306,7 @@ decode_bitset(struct tcb *const tcp, const kernel_ureg_t arg,
# ifdef EVIOCGMTSLOTS
static int
mtslots_ioctl(struct tcb *const tcp, const unsigned int code,
const kernel_ureg_t arg)
const kernel_ulong_t arg)
{
tprints(", ");
@ -338,7 +338,7 @@ mtslots_ioctl(struct tcb *const tcp, const unsigned int code,
# if defined EVIOCGREP || defined EVIOCSREP
static int
repeat_ioctl(struct tcb *const tcp, const kernel_ureg_t arg)
repeat_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
{
tprints(", ");
printpair_int(tcp, arg, "%u");
@ -348,7 +348,7 @@ repeat_ioctl(struct tcb *const tcp, const kernel_ureg_t arg)
static int
bit_ioctl(struct tcb *const tcp, const unsigned int ev_nr,
const kernel_ureg_t arg)
const kernel_ulong_t arg)
{
switch (ev_nr) {
case EV_SYN:
@ -399,7 +399,7 @@ bit_ioctl(struct tcb *const tcp, const unsigned int ev_nr,
static int
evdev_read_ioctl(struct tcb *const tcp, const unsigned int code,
const kernel_ureg_t arg)
const kernel_ulong_t arg)
{
/* fixed-number fixed-length commands */
switch (code) {
@ -474,7 +474,7 @@ evdev_read_ioctl(struct tcb *const tcp, const unsigned int code,
static int
evdev_write_ioctl(struct tcb *const tcp, const unsigned int code,
const kernel_ureg_t arg)
const kernel_ulong_t arg)
{
/* fixed-number fixed-length commands */
switch (code) {
@ -515,7 +515,7 @@ evdev_write_ioctl(struct tcb *const tcp, const unsigned int code,
}
MPERS_PRINTER_DECL(int, evdev_ioctl, struct tcb *const tcp,
const unsigned int code, const kernel_ureg_t arg)
const unsigned int code, const kernel_ulong_t arg)
{
switch(_IOC_DIR(code)) {
case _IOC_READ:

View File

@ -34,7 +34,7 @@
#include "defs.h"
static void
printargv(struct tcb *const tcp, kernel_ureg_t addr)
printargv(struct tcb *const tcp, kernel_ulong_t addr)
{
if (!addr || !verbose(tcp)) {
printaddr(addr);
@ -76,7 +76,7 @@ printargv(struct tcb *const tcp, kernel_ureg_t addr)
}
static void
printargc(struct tcb *const tcp, kernel_ureg_t addr)
printargc(struct tcb *const tcp, kernel_ulong_t addr)
{
if (!addr || !verbose(tcp)) {
printaddr(addr);

12
fcntl.c
View File

@ -54,7 +54,7 @@ print_struct_flock64(const struct_kernel_flock64 *fl, const int getlk)
}
static void
printflock64(struct tcb *const tcp, const kernel_ureg_t addr, const int getlk)
printflock64(struct tcb *const tcp, const kernel_ulong_t addr, const int getlk)
{
struct_kernel_flock64 fl;
@ -63,7 +63,7 @@ printflock64(struct tcb *const tcp, const kernel_ureg_t addr, const int getlk)
}
static void
printflock(struct tcb *const tcp, const kernel_ureg_t addr, const int getlk)
printflock(struct tcb *const tcp, const kernel_ulong_t addr, const int getlk)
{
struct_kernel_flock64 fl;
@ -72,7 +72,7 @@ printflock(struct tcb *const tcp, const kernel_ureg_t addr, const int getlk)
}
static void
print_f_owner_ex(struct tcb *const tcp, const kernel_ureg_t addr)
print_f_owner_ex(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct { int type, pid; } owner;
@ -143,7 +143,7 @@ print_fcntl(struct tcb *tcp)
if (entering(tcp) || syserror(tcp) || tcp->u_rval == 0)
return 0;
tcp->auxstr = sprintflags("flags ", fdflags,
(kernel_ureg_t) tcp->u_rval);
(kernel_ulong_t) tcp->u_rval);
return RVAL_HEX | RVAL_STR;
case F_GETFL:
if (entering(tcp) || syserror(tcp))
@ -171,13 +171,13 @@ print_fcntl(struct tcb *tcp)
case F_GETLEASE:
if (entering(tcp) || syserror(tcp))
return 0;
tcp->auxstr = xlookup(lockfcmds, (kernel_ureg_t) tcp->u_rval);
tcp->auxstr = xlookup(lockfcmds, (kernel_ulong_t) tcp->u_rval);
return RVAL_HEX | RVAL_STR;
case F_GET_SEALS:
if (entering(tcp) || syserror(tcp) || tcp->u_rval == 0)
return 0;
tcp->auxstr = sprintflags("seals ", f_seals,
(kernel_ureg_t) tcp->u_rval);
(kernel_ulong_t) tcp->u_rval);
return RVAL_HEX | RVAL_STR;
case F_GETSIG:
if (entering(tcp) || syserror(tcp) || tcp->u_rval == 0)

View File

@ -35,7 +35,7 @@ typedef struct seccomp_fprog seccomp_fprog_t;
#include MPERS_DEFS
MPERS_PRINTER_DECL(bool, fetch_seccomp_fprog, struct tcb *const tcp,
const kernel_ureg_t addr, void *const p)
const kernel_ulong_t addr, void *const p)
{
struct seccomp_fprog *pfp = p;
seccomp_fprog_t mfp;

View File

@ -52,7 +52,7 @@ typedef struct_kernel_flock64 struct_flock64;
&& FLOCK_MEMBERS_EQ(type, l_pid))
MPERS_PRINTER_DECL(bool, fetch_struct_flock, struct tcb *const tcp,
const kernel_ureg_t addr, void *const p)
const kernel_ulong_t addr, void *const p)
{
struct_kernel_flock64 *pfl = p;
struct_flock mfl;
@ -72,7 +72,7 @@ MPERS_PRINTER_DECL(bool, fetch_struct_flock, struct tcb *const tcp,
}
MPERS_PRINTER_DECL(bool, fetch_struct_flock64, struct tcb *const tcp,
const kernel_ureg_t addr, void *const p)
const kernel_ulong_t addr, void *const p)
{
struct_kernel_flock64 *pfl = p;
struct_flock64 mfl;

View File

@ -43,7 +43,7 @@ typedef struct mmsghdr struct_mmsghdr;
*/
MPERS_PRINTER_DECL(int, fetch_struct_mmsghdr,
struct tcb *const tcp, const kernel_ureg_t addr,
struct tcb *const tcp, const kernel_ulong_t addr,
void *const p)
{
struct mmsghdr *p_native = p;

View File

@ -43,7 +43,7 @@ typedef struct msghdr struct_msghdr;
*/
MPERS_PRINTER_DECL(int, fetch_struct_msghdr,
struct tcb *const tcp, const kernel_ureg_t addr,
struct tcb *const tcp, const kernel_ulong_t addr,
void *const p)
{
struct msghdr *const p_native = p;

View File

@ -70,7 +70,7 @@ typedef struct stat struct_stat;
#endif
MPERS_PRINTER_DECL(bool, fetch_struct_stat,
struct tcb *const tcp, const kernel_ureg_t addr,
struct tcb *const tcp, const kernel_ulong_t addr,
struct strace_stat *const dst)
{
#ifdef HAVE_STRUCT_STAT

View File

@ -68,7 +68,7 @@ typedef struct stat64 struct_stat64;
#endif
MPERS_PRINTER_DECL(bool, fetch_struct_stat64,
struct tcb *const tcp, const kernel_ureg_t addr,
struct tcb *const tcp, const kernel_ulong_t addr,
struct strace_stat *const dst)
{
#ifdef HAVE_STRUCT_STAT64

View File

@ -40,7 +40,7 @@ typedef struct statfs64 struct_statfs64;
#include "statfs.h"
MPERS_PRINTER_DECL(bool, fetch_struct_statfs,
struct tcb *const tcp, const kernel_ureg_t addr,
struct tcb *const tcp, const kernel_ulong_t addr,
struct strace_statfs *const p)
{
struct_statfs b;
@ -79,8 +79,8 @@ MPERS_PRINTER_DECL(bool, fetch_struct_statfs,
#endif
MPERS_PRINTER_DECL(bool, fetch_struct_statfs64,
struct tcb *const tcp, const kernel_ureg_t addr,
const kernel_ureg_t size, struct strace_statfs *const p)
struct tcb *const tcp, const kernel_ulong_t addr,
const kernel_ulong_t size, struct strace_statfs *const p)
{
struct_statfs64 b;

View File

@ -41,7 +41,7 @@ typedef struct {
SYS_FUNC(name_to_handle_at)
{
file_handle_header h;
const kernel_ureg_t addr = tcp->u_arg[2];
const kernel_ulong_t addr = tcp->u_arg[2];
if (entering(tcp)) {
/* dirfd */
@ -106,7 +106,7 @@ SYS_FUNC(name_to_handle_at)
SYS_FUNC(open_by_handle_at)
{
file_handle_header h;
const kernel_ureg_t addr = tcp->u_arg[1];
const kernel_ulong_t addr = tcp->u_arg[1];
/* mount_fd */
printfd(tcp, tcp->u_arg[0]);

View File

@ -124,7 +124,7 @@ print_fiemap_extent(struct tcb *tcp, void *elem_buf, size_t elem_size, void *dat
int
file_ioctl(struct tcb *const tcp, const unsigned int code,
const kernel_ureg_t arg)
const kernel_ulong_t arg)
{
switch (code) {
case FICLONE: /* W */

View File

@ -31,7 +31,7 @@
int
fs_x_ioctl(struct tcb *const tcp, const unsigned int code,
const kernel_ureg_t arg)
const kernel_ulong_t arg)
{
switch (code) {
#ifdef FITRIM

View File

@ -43,11 +43,11 @@
SYS_FUNC(futex)
{
const kernel_ureg_t uaddr = tcp->u_arg[0];
const kernel_ulong_t uaddr = tcp->u_arg[0];
const int op = tcp->u_arg[1];
const int cmd = op & 127;
const kernel_ureg_t timeout = tcp->u_arg[3];
const kernel_ureg_t uaddr2 = tcp->u_arg[4];
const kernel_ulong_t timeout = tcp->u_arg[3];
const kernel_ulong_t uaddr2 = tcp->u_arg[4];
const unsigned int val = tcp->u_arg[2];
const unsigned int val2 = tcp->u_arg[3];
const unsigned int val3 = tcp->u_arg[5];

2
hdio.c
View File

@ -37,7 +37,7 @@ typedef struct hd_geometry struct_hd_geometry;
#include MPERS_DEFS
MPERS_PRINTER_DECL(int, hdio_ioctl, struct tcb *const tcp,
const unsigned int code, const kernel_ureg_t arg)
const unsigned int code, const kernel_ulong_t arg)
{
switch (code) {
case HDIO_GETGEO:

18
io.c
View File

@ -59,14 +59,14 @@ SYS_FUNC(write)
struct print_iovec_config {
enum iov_decode decode_iov;
kernel_ureg_t data_size;
kernel_ulong_t data_size;
};
static bool
print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
{
const kernel_ureg_t *iov;
kernel_ureg_t iov_buf[2], len;
const kernel_ulong_t *iov;
kernel_ulong_t iov_buf[2], len;
struct print_iovec_config *c = data;
if (elem_size < sizeof(iov_buf)) {
@ -85,14 +85,14 @@ print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
case IOV_DECODE_STR:
if (len > c->data_size)
len = c->data_size;
if (c->data_size != (kernel_ureg_t) -1)
if (c->data_size != (kernel_ulong_t) -1)
c->data_size -= len;
printstrn(tcp, iov[0], len);
break;
case IOV_DECODE_NETLINK:
if (len > c->data_size)
len = c->data_size;
if (c->data_size != (kernel_ureg_t) -1)
if (c->data_size != (kernel_ulong_t) -1)
c->data_size -= len;
decode_netlink(tcp, iov[0], iov[1]);
break;
@ -111,11 +111,11 @@ print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
* Example: recvmsg returing a short read.
*/
void
tprint_iov_upto(struct tcb *const tcp, const kernel_ureg_t len,
const kernel_ureg_t addr, const enum iov_decode decode_iov,
const kernel_ureg_t data_size)
tprint_iov_upto(struct tcb *const tcp, const kernel_ulong_t len,
const kernel_ulong_t addr, const enum iov_decode decode_iov,
const kernel_ulong_t data_size)
{
kernel_ureg_t iov[2];
kernel_ulong_t iov[2];
struct print_iovec_config config =
{ .decode_iov = decode_iov, .data_size = data_size };

View File

@ -227,7 +227,7 @@ static int
ioctl_decode(struct tcb *tcp)
{
const unsigned int code = tcp->u_arg[1];
const kernel_ureg_t arg = tcp->u_arg[2];
const kernel_ulong_t arg = tcp->u_arg[2];
switch (_IOC_TYPE(code)) {
#if defined(ALPHA) || defined(POWERPC)

View File

@ -57,8 +57,8 @@ SYS_FUNC(msgget)
}
static void
tprint_msgsnd(struct tcb *const tcp, const kernel_ureg_t addr,
const kernel_ureg_t count, const unsigned int flags)
tprint_msgsnd(struct tcb *const tcp, const kernel_ulong_t addr,
const kernel_ulong_t count, const unsigned int flags)
{
tprint_msgbuf(tcp, addr, count);
printflags(ipc_msg_flags, flags, "MSG_???");
@ -78,16 +78,16 @@ SYS_FUNC(msgsnd)
}
static void
tprint_msgrcv(struct tcb *const tcp, const kernel_ureg_t addr,
const kernel_ureg_t count, const kernel_ureg_t msgtyp)
tprint_msgrcv(struct tcb *const tcp, const kernel_ulong_t addr,
const kernel_ulong_t count, const kernel_ulong_t msgtyp)
{
tprint_msgbuf(tcp, addr, count);
tprintf("%" PRI_krd ", ", msgtyp);
}
static int
fetch_msgrcv_args(struct tcb *const tcp, const kernel_ureg_t addr,
kernel_ureg_t *const pair)
fetch_msgrcv_args(struct tcb *const tcp, const kernel_ulong_t addr,
kernel_ulong_t *const pair)
{
if (current_wordsize == sizeof(*pair)) {
if (umoven_or_printaddr(tcp, addr, 2 * sizeof(*pair), pair))
@ -118,7 +118,7 @@ SYS_FUNC(msgrcv)
tprint_msgrcv(tcp, tcp->u_arg[3],
tcp->u_arg[1], tcp->u_arg[4]);
} else {
kernel_ureg_t pair[2];
kernel_ulong_t pair[2];
if (fetch_msgrcv_args(tcp, tcp->u_arg[3], pair))
tprintf(", %" PRI_kru ", ", tcp->u_arg[1]);

View File

@ -51,7 +51,7 @@ typedef struct msqid64_ds msqid_ds_t;
#include "xlat/msgctl_flags.h"
static void
print_msqid_ds(struct tcb *const tcp, const kernel_ureg_t addr, int cmd)
print_msqid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd)
{
/* TODO: We don't properly decode old compat ipc calls. */
if (cmd & IPC_64)
@ -101,7 +101,7 @@ SYS_FUNC(msgctl)
PRINTCTL(msgctl_flags, tcp->u_arg[1], "MSG_???");
tprints(", ");
} else {
const kernel_ureg_t addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2];
const kernel_ulong_t addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2];
print_msqid_ds(tcp, addr, tcp->u_arg[1]);
}
return 0;

View File

@ -57,7 +57,7 @@ print_sembuf(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
#endif
static void
tprint_sembuf_array(struct tcb *const tcp, const kernel_ureg_t addr,
tprint_sembuf_array(struct tcb *const tcp, const kernel_ulong_t addr,
const unsigned int count)
{
#if defined HAVE_SYS_SEM_H || defined HAVE_LINUX_SEM_H

View File

@ -51,7 +51,7 @@ typedef struct shmid64_ds shmid_ds_t;
#include "xlat/shmctl_flags.h"
static void
print_shmid_ds(struct tcb *const tcp, const kernel_ureg_t addr, int cmd)
print_shmid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd)
{
/* TODO: We don't properly decode old compat ipc calls. */
if (cmd & IPC_64)
@ -101,7 +101,7 @@ SYS_FUNC(shmctl)
PRINTCTL(shmctl_flags, tcp->u_arg[1], "SHM_???");
tprints(", ");
} else {
const kernel_ureg_t addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2];
const kernel_ulong_t addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2];
print_shmid_ds(tcp, addr, tcp->u_arg[1]);
}
return 0;

View File

@ -47,9 +47,6 @@ typedef unsigned long kernel_ulong_t;
# endif
typedef kernel_ulong_t kernel_scno_t;
typedef kernel_ulong_t kernel_ureg_t;
typedef struct {
kernel_ulong_t d_ino;
kernel_ulong_t d_off;

14
kexec.c
View File

@ -40,8 +40,8 @@
static bool
print_seg(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
{
const kernel_ureg_t *seg;
kernel_ureg_t seg_buf[4];
const kernel_ulong_t *seg;
kernel_ulong_t seg_buf[4];
if (elem_size < sizeof(seg_buf)) {
unsigned int i;
@ -63,15 +63,15 @@ print_seg(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
}
static void
print_kexec_segments(struct tcb *const tcp, const kernel_ureg_t addr,
const kernel_ureg_t len)
print_kexec_segments(struct tcb *const tcp, const kernel_ulong_t addr,
const kernel_ulong_t len)
{
if (len > KEXEC_SEGMENT_MAX) {
printaddr(addr);
return;
}
kernel_ureg_t seg[4];
kernel_ulong_t seg[4];
const size_t sizeof_seg = ARRAY_SIZE(seg) * current_wordsize;
print_array(tcp, addr, len, seg, sizeof_seg,
@ -89,9 +89,9 @@ SYS_FUNC(kexec_load)
tprints(", ");
/* flags */
kernel_ureg_t n = tcp->u_arg[3];
kernel_ulong_t n = tcp->u_arg[3];
printxval64(kexec_arch_values, n & KEXEC_ARCH_MASK, "KEXEC_ARCH_???");
n &= ~(kernel_ureg_t) KEXEC_ARCH_MASK;
n &= ~(kernel_ulong_t) KEXEC_ARCH_MASK;
if (n) {
tprints("|");
printflags64(kexec_load_flags, n, "KEXEC_???");

2
ldt.c
View File

@ -38,7 +38,7 @@
# include <asm/ldt.h>
void
print_user_desc(struct tcb *const tcp, const kernel_ureg_t addr)
print_user_desc(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct user_desc desc;

View File

@ -2,7 +2,7 @@
static int
arch_get_scno(struct tcb *tcp)
{
kernel_scno_t scno = 0;
kernel_ulong_t scno = 0;
switch (aarch64_io.iov_len) {
case sizeof(aarch64_regs):

View File

@ -7,7 +7,7 @@
*/
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
unsigned int n = (uint16_t) scno;
const struct iovec io = {

View File

@ -2,7 +2,7 @@
static int
arch_get_scno(struct tcb *tcp)
{
kernel_scno_t scno = 0;
kernel_ulong_t scno = 0;
if (upeek(tcp->pid, REG_A3, &alpha_a3) < 0)
return -1;

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
return upoke(tcp->pid, REG_R0, scno);
}

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
arc_regs.scratch.r8 = scno;
return set_regs(tcp->pid);

View File

@ -31,7 +31,7 @@
static int
arch_get_scno(struct tcb *tcp)
{
kernel_scno_t scno = 0;
kernel_ulong_t scno = 0;
/* Note: we support only 32-bit CPUs, not 26-bit */

View File

@ -7,7 +7,7 @@
*/
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
unsigned int n = (uint16_t) scno;
int rc = ptrace(PTRACE_SET_SYSCALL, tcp->pid, NULL, (unsigned long) n);

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
avr32_regs.r8 = scno;
return set_regs(tcp->pid);

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
return upoke(tcp->pid, PT_ORIG_P0, scno);
}

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
return upoke(tcp->pid, 4 * PT_R9, scno);
}

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
return upoke(tcp->pid, PT_GR20, scno);
}

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
#ifdef HAVE_GETREGS_OLD
return upoke(tcp->pid, 4 * ORIG_EAX, scno);

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
if (ia64_ia32mode)
ia64_regs.gr[0] = scno;

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
m68k_regs.orig_d0 = scno;
return set_regs(tcp->pid);

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
metag_regs.dx[0][1] = scno;
return set_regs(tcp->pid);

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
return upoke(tcp->pid, 0, scno);
}

View File

@ -6,7 +6,7 @@ arch_sigreturn(struct tcb *tcp)
* offsetof(struct sigframe, sf_mask) ==
* sizeof(sf_ass) + sizeof(sf_pad) + sizeof(struct sigcontext)
*/
const kernel_ureg_t addr = mips_REG_SP + 6 * 4 +
const kernel_ulong_t addr = mips_REG_SP + 6 * 4 +
sizeof(struct sigcontext);
#else
/*
@ -16,7 +16,7 @@ arch_sigreturn(struct tcb *tcp)
* offsetof(struct rt_sigframe, rs_uc) ==
* sizeof(sf_ass) + sizeof(sf_pad) + sizeof(struct siginfo)
*/
const kernel_ureg_t addr = mips_REG_SP + 6 * 4 + 128 +
const kernel_ulong_t addr = mips_REG_SP + 6 * 4 + 128 +
offsetof(struct ucontext, uc_sigmask);
#endif

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
mips_REG_V0 = scno;
return set_regs(tcp->pid);

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
nios2_regs.regs[2] = scno;
return set_regs(tcp->pid);

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
or1k_regs.gpr[11] = scno;
return set_regs(tcp->pid);

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
#ifdef HAVE_GETREGS_OLD
return upoke(tcp->pid, sizeof(long) * PT_R0, scno);

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
riscv_regs.a7 = scno;
return set_regs(tcp->pid);

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
s390_regset.gprs[2] = scno;
return set_regs(tcp->pid);

View File

@ -2,7 +2,7 @@
static int
arch_get_scno(struct tcb *tcp)
{
kernel_scno_t scno = 0;
kernel_ulong_t scno = 0;
/*
* In the new syscall ABI, the system call number is in R3.
@ -14,7 +14,7 @@ arch_get_scno(struct tcb *tcp)
/* Odd as it may seem, a glibc bug has been known to cause
glibc to issue bogus negative syscall numbers. So for
our purposes, make strace print what it *should* have been */
kernel_scno_t correct_scno = (scno & 0xff);
kernel_ulong_t correct_scno = (scno & 0xff);
if (debug_flag)
error_msg("Detected glibc bug: bogus system call"
" number = %ld, correcting to %ld",

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
return upoke(tcp->pid, 4 * (REG_REG0 + 3), scno);
}

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
return upoke(tcp->pid, REG_SYSCALL, scno);
}

View File

@ -4,7 +4,7 @@
*/
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
sparc_regs.u_regs[U_REG_G1] = scno;
return set_regs(tcp->pid);

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
tile_regs.regs[10] = scno;
return set_regs(tcp->pid);

View File

@ -18,14 +18,14 @@ arch_sigreturn(struct tcb *tcp)
#define X86_64_SIGMASK_OFFSET offsetof(struct ucontext, uc_sigmask)
#define X32_SIGMASK_OFFSET sizeof(ucontext_x32_header)
const kernel_ureg_t offset =
const kernel_ulong_t offset =
#ifdef X32
X32_SIGMASK_OFFSET;
#else
current_personality == 2 ? X32_SIGMASK_OFFSET :
X86_64_SIGMASK_OFFSET;
#endif
const kernel_ureg_t addr = (kernel_ureg_t) *x86_64_rsp_ptr + offset;
const kernel_ulong_t addr = (kernel_ulong_t) *x86_64_rsp_ptr + offset;
tprints("{mask=");
print_sigset_addr_len(tcp, addr, NSIG / 8);
tprints("}");

View File

@ -40,7 +40,7 @@
static int
arch_get_scno(struct tcb *tcp)
{
kernel_scno_t scno = 0;
kernel_ulong_t scno = 0;
unsigned int currpers;
#ifndef __X32_SYSCALL_BIT

View File

@ -5,7 +5,7 @@
#endif /* !HAVE_GETREGS_OLD */
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
#ifdef HAVE_GETREGS_OLD
return upoke(tcp->pid, 8 * ORIG_RAX, scno);

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_scno_t scno)
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
return upoke(tcp->pid, SYSCALL_NR, scno);
}

6
loop.c
View File

@ -33,7 +33,7 @@
#include "xlat/loop_crypt_type_options.h"
static void
decode_loop_info(struct tcb *const tcp, const kernel_ureg_t addr)
decode_loop_info(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct loop_info info;
@ -83,7 +83,7 @@ decode_loop_info(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_loop_info64(struct tcb *const tcp, const kernel_ureg_t addr)
decode_loop_info64(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct loop_info64 info64;
@ -141,7 +141,7 @@ decode_loop_info64(struct tcb *const tcp, const kernel_ureg_t addr)
int
loop_ioctl(struct tcb *const tcp, const unsigned int code,
const kernel_ureg_t arg)
const kernel_ulong_t arg)
{
if (!verbose(tcp))
return RVAL_DECODED;

32
mem.c
View File

@ -55,12 +55,12 @@ SYS_FUNC(brk)
#include "xlat/mmap_flags.h"
static void
print_mmap(struct tcb *tcp, kernel_ureg_t *u_arg, unsigned long long offset)
print_mmap(struct tcb *tcp, kernel_ulong_t *u_arg, unsigned long long offset)
{
const kernel_ureg_t addr = u_arg[0];
const kernel_ureg_t len = u_arg[1];
const kernel_ureg_t prot = u_arg[2];
const kernel_ureg_t flags = u_arg[3];
const kernel_ulong_t addr = u_arg[0];
const kernel_ulong_t len = u_arg[1];
const kernel_ulong_t prot = u_arg[2];
const kernel_ulong_t flags = u_arg[3];
const int fd = u_arg[4];
printaddr(addr);
@ -93,7 +93,7 @@ print_mmap(struct tcb *tcp, kernel_ureg_t *u_arg, unsigned long long offset)
/* Params are pointed to by u_arg[0], offset is in bytes */
SYS_FUNC(old_mmap)
{
kernel_ureg_t u_arg[6];
kernel_ulong_t u_arg[6];
# ifndef current_klongsize
/* We are here only in a 32-bit personality. */
unsigned int narrow_arg[6];
@ -116,7 +116,7 @@ SYS_FUNC(old_mmap)
/* Params are pointed to by u_arg[0], offset is in pages */
SYS_FUNC(old_mmap_pgoff)
{
kernel_ureg_t u_arg[5];
kernel_ulong_t u_arg[5];
int i;
unsigned int narrow_arg[6];
unsigned long long offset;
@ -312,11 +312,11 @@ SYS_FUNC(getpagesize)
SYS_FUNC(remap_file_pages)
{
const kernel_ureg_t addr = tcp->u_arg[0];
const kernel_ureg_t size = tcp->u_arg[1];
const kernel_ureg_t prot = tcp->u_arg[2];
const kernel_ureg_t pgoff = tcp->u_arg[3];
const kernel_ureg_t flags = tcp->u_arg[4];
const kernel_ulong_t addr = tcp->u_arg[0];
const kernel_ulong_t size = tcp->u_arg[1];
const kernel_ulong_t prot = tcp->u_arg[2];
const kernel_ulong_t pgoff = tcp->u_arg[3];
const kernel_ulong_t flags = tcp->u_arg[4];
printaddr(addr);
tprintf(", %" PRI_kru ", ", size);
@ -343,10 +343,10 @@ print_protmap_entry(struct tcb *tcp, void *elem_buf, size_t elem_size, void *dat
SYS_FUNC(subpage_prot)
{
kernel_ureg_t addr = tcp->u_arg[0];
kernel_ureg_t len = tcp->u_arg[1];
kernel_ureg_t nmemb = len >> 16;
kernel_ureg_t map = tcp->u_arg[2];
kernel_ulong_t addr = tcp->u_arg[0];
kernel_ulong_t len = tcp->u_arg[1];
kernel_ulong_t nmemb = len >> 16;
kernel_ulong_t map = tcp->u_arg[2];
printaddr(addr);
tprintf(", %" PRI_kru ", ", len);

View File

@ -44,6 +44,6 @@ SYS_FUNC(membarrier)
return 0;
tcp->auxstr = sprintflags("", membarrier_cmds,
(kernel_ureg_t) tcp->u_rval);
(kernel_ulong_t) tcp->u_rval);
return RVAL_HEX | RVAL_STR;
}

View File

@ -34,7 +34,7 @@
static int
fetch_struct_mmsghdr_or_printaddr(struct tcb *const tcp,
const kernel_ureg_t addr,
const kernel_ulong_t addr,
const unsigned int len, void *const mh)
{
if ((entering(tcp) || !syserror(tcp))
@ -68,7 +68,7 @@ print_struct_mmsghdr(struct tcb *tcp, void *elem_buf,
tprints("{msg_hdr=");
print_struct_msghdr(tcp, &mmsg->msg_hdr, c->p_user_msg_namelen,
c->use_msg_len ? mmsg->msg_len : (kernel_ureg_t) -1);
c->use_msg_len ? mmsg->msg_len : (kernel_ulong_t) -1);
if (c->msg_len_vlen) {
tprintf(", msg_len=%u", mmsg->msg_len);
--c->msg_len_vlen;
@ -98,7 +98,7 @@ struct mmsgvec_data {
};
static void
save_mmsgvec_namelen(struct tcb *const tcp, kernel_ureg_t addr,
save_mmsgvec_namelen(struct tcb *const tcp, kernel_ulong_t addr,
unsigned int len, const char *const timeout)
{
if (len > IOV_MAX)
@ -125,7 +125,7 @@ save_mmsgvec_namelen(struct tcb *const tcp, kernel_ureg_t addr,
}
static void
decode_mmsgvec(struct tcb *const tcp, const kernel_ureg_t addr,
decode_mmsgvec(struct tcb *const tcp, const kernel_ulong_t addr,
const unsigned int vlen, const unsigned int msg_len_vlen,
const bool use_msg_len)
{
@ -149,7 +149,7 @@ decode_mmsgvec(struct tcb *const tcp, const kernel_ureg_t addr,
}
void
dumpiov_in_mmsghdr(struct tcb *const tcp, kernel_ureg_t addr)
dumpiov_in_mmsghdr(struct tcb *const tcp, kernel_ulong_t addr)
{
unsigned int len = tcp->u_rval;
unsigned int i, fetched;
@ -160,7 +160,7 @@ dumpiov_in_mmsghdr(struct tcb *const tcp, kernel_ureg_t addr)
if (!fetched)
break;
tprintf(" = %" PRI_kru " buffers in vector %u\n",
(kernel_ureg_t) mmsg.msg_hdr.msg_iovlen, i);
(kernel_ulong_t) mmsg.msg_hdr.msg_iovlen, i);
dumpiov_upto(tcp, mmsg.msg_hdr.msg_iovlen,
ptr_to_kulong(mmsg.msg_hdr.msg_iov),
mmsg.msg_len);

View File

@ -42,7 +42,7 @@ SYS_FUNC(mount)
bool ignore_type = false;
bool ignore_data = false;
bool old_magic = false;
kernel_ureg_t flags = tcp->u_arg[3];
kernel_ulong_t flags = tcp->u_arg[3];
/* Discard magic */
if ((flags & MS_MGC_MSK) == MS_MGC_VAL) {

View File

@ -252,8 +252,8 @@ get_optmem_max(void)
}
static void
decode_msg_control(struct tcb *const tcp, const kernel_ureg_t addr,
const kernel_ureg_t in_control_len)
decode_msg_control(struct tcb *const tcp, const kernel_ulong_t addr,
const kernel_ulong_t in_control_len)
{
if (!in_control_len)
return;
@ -279,7 +279,7 @@ decode_msg_control(struct tcb *const tcp, const kernel_ureg_t addr,
tprints("[");
while (buf_len >= cmsg_size) {
const kernel_ureg_t cmsg_len =
const kernel_ulong_t cmsg_len =
#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4
(current_wordsize < sizeof(long)) ? u.cmsg32->cmsg_len :
#endif
@ -301,7 +301,7 @@ decode_msg_control(struct tcb *const tcp, const kernel_ureg_t addr,
printxval(socketlayers, cmsg_level, "SOL_???");
tprints(", cmsg_type=");
kernel_ureg_t len = cmsg_len > buf_len ? buf_len : cmsg_len;
kernel_ulong_t len = cmsg_len > buf_len ? buf_len : cmsg_len;
print_cmsg_type_data(tcp, cmsg_level, cmsg_type,
(const void *) (u.ptr + cmsg_size),
@ -313,7 +313,7 @@ decode_msg_control(struct tcb *const tcp, const kernel_ureg_t addr,
break;
}
len = (cmsg_len + current_wordsize - 1) &
~((kernel_ureg_t) current_wordsize - 1);
~((kernel_ulong_t) current_wordsize - 1);
if (len >= buf_len) {
buf_len = 0;
break;
@ -334,7 +334,7 @@ decode_msg_control(struct tcb *const tcp, const kernel_ureg_t addr,
void
print_struct_msghdr(struct tcb *tcp, const struct msghdr *msg,
const int *const p_user_msg_namelen,
const kernel_ureg_t data_size)
const kernel_ulong_t data_size)
{
const int msg_namelen =
p_user_msg_namelen && (int) msg->msg_namelen > *p_user_msg_namelen
@ -355,11 +355,11 @@ print_struct_msghdr(struct tcb *tcp, const struct msghdr *msg,
tprint_iov_upto(tcp, msg->msg_iovlen,
ptr_to_kulong(msg->msg_iov), decode, data_size);
tprintf(", msg_iovlen=%" PRI_kru, (kernel_ureg_t) msg->msg_iovlen);
tprintf(", msg_iovlen=%" PRI_kru, (kernel_ulong_t) msg->msg_iovlen);
decode_msg_control(tcp, ptr_to_kulong(msg->msg_control),
msg->msg_controllen);
tprintf(", msg_controllen=%" PRI_kru, (kernel_ureg_t) msg->msg_controllen);
tprintf(", msg_controllen=%" PRI_kru, (kernel_ulong_t) msg->msg_controllen);
tprints(", msg_flags=");
printflags(msg_flags, msg->msg_flags, "MSG_???");
@ -367,7 +367,7 @@ print_struct_msghdr(struct tcb *tcp, const struct msghdr *msg,
}
static bool
fetch_msghdr_namelen(struct tcb *const tcp, const kernel_ureg_t addr,
fetch_msghdr_namelen(struct tcb *const tcp, const kernel_ulong_t addr,
int *const p_msg_namelen)
{
struct msghdr msg;
@ -382,7 +382,7 @@ fetch_msghdr_namelen(struct tcb *const tcp, const kernel_ureg_t addr,
static void
decode_msghdr(struct tcb *const tcp, const int *const p_user_msg_namelen,
const kernel_ureg_t addr, const kernel_ureg_t data_size)
const kernel_ulong_t addr, const kernel_ulong_t data_size)
{
struct msghdr msg;
@ -393,8 +393,8 @@ decode_msghdr(struct tcb *const tcp, const int *const p_user_msg_namelen,
}
void
dumpiov_in_msghdr(struct tcb *const tcp, const kernel_ureg_t addr,
const kernel_ureg_t data_size)
dumpiov_in_msghdr(struct tcb *const tcp, const kernel_ulong_t addr,
const kernel_ulong_t data_size)
{
struct msghdr msg;

View File

@ -15,6 +15,6 @@ struct tcb;
extern void
print_struct_msghdr(struct tcb *, const struct msghdr *,
const int *p_user_msg_namelen, kernel_ureg_t data_size);
const int *p_user_msg_namelen, kernel_ulong_t data_size);
#endif /* !STRACE_MSGHDR_H */

24
mtd.c
View File

@ -50,7 +50,7 @@ typedef struct mtd_oob_buf struct_mtd_oob_buf;
#include "xlat/mtd_nandecc_options.h"
static void
decode_erase_info_user(struct tcb *const tcp, const kernel_ureg_t addr)
decode_erase_info_user(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct erase_info_user einfo;
@ -62,7 +62,7 @@ decode_erase_info_user(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_erase_info_user64(struct tcb *const tcp, const kernel_ureg_t addr)
decode_erase_info_user64(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct erase_info_user64 einfo64;
@ -75,7 +75,7 @@ decode_erase_info_user64(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_mtd_oob_buf(struct tcb *const tcp, const kernel_ureg_t addr)
decode_mtd_oob_buf(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct_mtd_oob_buf mbuf;
@ -89,7 +89,7 @@ decode_mtd_oob_buf(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_mtd_oob_buf64(struct tcb *const tcp, const kernel_ureg_t addr)
decode_mtd_oob_buf64(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct mtd_oob_buf64 mbuf64;
@ -103,7 +103,7 @@ decode_mtd_oob_buf64(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_otp_info(struct tcb *const tcp, const kernel_ureg_t addr)
decode_otp_info(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct otp_info oinfo;
@ -116,7 +116,7 @@ decode_otp_info(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_otp_select(struct tcb *const tcp, const kernel_ureg_t addr)
decode_otp_select(struct tcb *const tcp, const kernel_ulong_t addr)
{
unsigned int i;
@ -130,7 +130,7 @@ decode_otp_select(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_mtd_write_req(struct tcb *const tcp, const kernel_ureg_t addr)
decode_mtd_write_req(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct mtd_write_req mreq;
@ -149,7 +149,7 @@ decode_mtd_write_req(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_mtd_info_user(struct tcb *const tcp, const kernel_ureg_t addr)
decode_mtd_info_user(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct mtd_info_user minfo;
@ -168,7 +168,7 @@ decode_mtd_info_user(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_nand_oobinfo(struct tcb *const tcp, const kernel_ureg_t addr)
decode_nand_oobinfo(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct nand_oobinfo ninfo;
unsigned int i, j;
@ -204,7 +204,7 @@ decode_nand_oobinfo(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_nand_ecclayout_user(struct tcb *const tcp, const kernel_ureg_t addr)
decode_nand_ecclayout_user(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct nand_ecclayout_user nlay;
unsigned int i;
@ -230,7 +230,7 @@ decode_nand_ecclayout_user(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_mtd_ecc_stats(struct tcb *const tcp, const kernel_ureg_t addr)
decode_mtd_ecc_stats(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct mtd_ecc_stats es;
@ -243,7 +243,7 @@ decode_mtd_ecc_stats(struct tcb *const tcp, const kernel_ureg_t addr)
}
MPERS_PRINTER_DECL(int, mtd_ioctl, struct tcb *const tcp,
const unsigned int code, const kernel_ureg_t arg)
const unsigned int code, const kernel_ulong_t arg)
{
switch (code) {
case MEMERASE:

30
net.c
View File

@ -104,8 +104,8 @@ print_ifindex(unsigned int ifindex)
}
static void
decode_sockbuf(struct tcb *const tcp, const int fd, const kernel_ureg_t addr,
const kernel_ureg_t addrlen)
decode_sockbuf(struct tcb *const tcp, const int fd, const kernel_ulong_t addr,
const kernel_ulong_t addrlen)
{
switch (verbose(tcp) ? getfdproto(tcp, fd) : SOCK_PROTO_UNKNOWN) {
@ -188,7 +188,7 @@ SYS_FUNC(listen)
static bool
fetch_socklen(struct tcb *const tcp, int *const plen,
const kernel_ureg_t sockaddr, const kernel_ureg_t socklen)
const kernel_ulong_t sockaddr, const kernel_ulong_t socklen)
{
return verbose(tcp) && sockaddr && socklen
&& umove(tcp, socklen, plen) == 0;
@ -374,7 +374,7 @@ printpair_fd(struct tcb *tcp, const int i0, const int i1)
}
static void
decode_pair_fd(struct tcb *const tcp, const kernel_ureg_t addr)
decode_pair_fd(struct tcb *const tcp, const kernel_ulong_t addr)
{
int pair[2];
@ -487,7 +487,7 @@ print_sockopt_fd_level_name(struct tcb *tcp, int fd, unsigned int level,
}
static void
print_linger(struct tcb *const tcp, const kernel_ureg_t addr, const int len)
print_linger(struct tcb *const tcp, const kernel_ulong_t addr, const int len)
{
struct linger linger;
@ -504,7 +504,7 @@ print_linger(struct tcb *const tcp, const kernel_ureg_t addr, const int len)
#ifdef SO_PEERCRED
static void
print_ucred(struct tcb *const tcp, const kernel_ureg_t addr, const int len)
print_ucred(struct tcb *const tcp, const kernel_ulong_t addr, const int len)
{
struct ucred uc;
@ -522,7 +522,7 @@ print_ucred(struct tcb *const tcp, const kernel_ureg_t addr, const int len)
#ifdef PACKET_STATISTICS
static void
print_tpacket_stats(struct tcb *const tcp, const kernel_ureg_t addr,
print_tpacket_stats(struct tcb *const tcp, const kernel_ulong_t addr,
const int len)
{
struct tpacket_stats stats;
@ -541,7 +541,7 @@ print_tpacket_stats(struct tcb *const tcp, const kernel_ureg_t addr,
#include "xlat/icmpfilterflags.h"
static void
print_icmp_filter(struct tcb *const tcp, const kernel_ureg_t addr, int len)
print_icmp_filter(struct tcb *const tcp, const kernel_ulong_t addr, int len)
{
struct icmp_filter filter = {};
@ -562,7 +562,7 @@ print_icmp_filter(struct tcb *const tcp, const kernel_ureg_t addr, int len)
static void
print_getsockopt(struct tcb *const tcp, const unsigned int level,
const unsigned int name, const kernel_ureg_t addr,
const unsigned int name, const kernel_ulong_t addr,
const int len)
{
if (addr && verbose(tcp))
@ -636,7 +636,7 @@ SYS_FUNC(getsockopt)
#ifdef IP_ADD_MEMBERSHIP
static void
print_mreq(struct tcb *const tcp, const kernel_ureg_t addr,
print_mreq(struct tcb *const tcp, const kernel_ulong_t addr,
const unsigned int len)
{
struct ip_mreq mreq;
@ -660,7 +660,7 @@ print_mreq(struct tcb *const tcp, const kernel_ureg_t addr,
#ifdef IPV6_ADD_MEMBERSHIP
static void
print_mreq6(struct tcb *const tcp, const kernel_ureg_t addr,
print_mreq6(struct tcb *const tcp, const kernel_ulong_t addr,
const unsigned int len)
{
struct ipv6_mreq mreq;
@ -691,7 +691,7 @@ fail:
#ifdef MCAST_JOIN_GROUP
static void
print_group_req(struct tcb *const tcp, const kernel_ureg_t addr, const int len)
print_group_req(struct tcb *const tcp, const kernel_ulong_t addr, const int len)
{
struct group_req greq;
@ -710,7 +710,7 @@ print_group_req(struct tcb *const tcp, const kernel_ureg_t addr, const int len)
#ifdef PACKET_RX_RING
static void
print_tpacket_req(struct tcb *const tcp, const kernel_ureg_t addr, const int len)
print_tpacket_req(struct tcb *const tcp, const kernel_ulong_t addr, const int len)
{
struct tpacket_req req;
@ -732,7 +732,7 @@ print_tpacket_req(struct tcb *const tcp, const kernel_ureg_t addr, const int len
# include "xlat/packet_mreq_type.h"
static void
print_packet_mreq(struct tcb *const tcp, const kernel_ureg_t addr, const int len)
print_packet_mreq(struct tcb *const tcp, const kernel_ulong_t addr, const int len)
{
struct packet_mreq mreq;
@ -756,7 +756,7 @@ print_packet_mreq(struct tcb *const tcp, const kernel_ureg_t addr, const int len
static void
print_setsockopt(struct tcb *const tcp, const unsigned int level,
const unsigned int name, const kernel_ureg_t addr,
const unsigned int name, const kernel_ulong_t addr,
const int len)
{
if (addr && verbose(tcp))

View File

@ -37,7 +37,7 @@
*/
static bool
fetch_nlmsghdr(struct tcb *const tcp, struct nlmsghdr *const nlmsghdr,
const kernel_ureg_t addr, const kernel_ureg_t len)
const kernel_ulong_t addr, const kernel_ulong_t len)
{
if (len < sizeof(struct nlmsghdr)) {
printstrn(tcp, addr, len);
@ -69,8 +69,8 @@ print_nlmsghdr(struct tcb *tcp, const struct nlmsghdr *const nlmsghdr)
static void
decode_nlmsghdr_with_payload(struct tcb *const tcp,
const struct nlmsghdr *const nlmsghdr,
const kernel_ureg_t addr,
const kernel_ureg_t len)
const kernel_ulong_t addr,
const kernel_ulong_t len)
{
tprints("{");
@ -89,7 +89,7 @@ decode_nlmsghdr_with_payload(struct tcb *const tcp,
}
void
decode_netlink(struct tcb *const tcp, kernel_ureg_t addr, kernel_ureg_t len)
decode_netlink(struct tcb *const tcp, kernel_ulong_t addr, kernel_ulong_t len)
{
struct nlmsghdr nlmsghdr;
bool print_array = false;
@ -102,8 +102,8 @@ decode_netlink(struct tcb *const tcp, kernel_ureg_t addr, kernel_ureg_t len)
}
unsigned int nlmsg_len = NLMSG_ALIGN(nlmsghdr.nlmsg_len);
kernel_ureg_t next_addr = 0;
kernel_ureg_t next_len = 0;
kernel_ulong_t next_addr = 0;
kernel_ulong_t next_len = 0;
if (nlmsghdr.nlmsg_len >= sizeof(struct nlmsghdr)) {
next_len = (len >= nlmsg_len) ? len - nlmsg_len : 0;

20
numa.c
View File

@ -31,23 +31,23 @@
static bool
print_node(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
{
if (elem_size < sizeof(kernel_ureg_t)) {
if (elem_size < sizeof(kernel_ulong_t)) {
tprintf("%#0*x", (int) elem_size * 2 + 2,
* (unsigned int *) elem_buf);
} else {
tprintf("%#0*" PRI_krx, (int) elem_size * 2 + 2,
* (kernel_ureg_t *) elem_buf);
* (kernel_ulong_t *) elem_buf);
}
return true;
}
static void
print_nodemask(struct tcb *const tcp, const kernel_ureg_t addr,
const kernel_ureg_t maxnodes)
print_nodemask(struct tcb *const tcp, const kernel_ulong_t addr,
const kernel_ulong_t maxnodes)
{
const unsigned int bits_per_long = 8 * current_wordsize;
const kernel_ureg_t nmemb =
const kernel_ulong_t nmemb =
(maxnodes + bits_per_long - 2) / bits_per_long;
if (nmemb < maxnodes / bits_per_long ||
@ -56,7 +56,7 @@ print_nodemask(struct tcb *const tcp, const kernel_ureg_t addr,
return;
}
kernel_ureg_t buf;
kernel_ulong_t buf;
print_array(tcp, addr, nmemb, &buf, current_wordsize,
umoven_or_printaddr, print_node, 0);
}
@ -123,12 +123,12 @@ SYS_FUNC(get_mempolicy)
static bool
print_addr(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
{
kernel_ureg_t addr;
kernel_ulong_t addr;
if (elem_size < sizeof(addr)) {
addr = * (unsigned int *) elem_buf;
} else {
addr = * (kernel_ureg_t *) elem_buf;
addr = * (kernel_ulong_t *) elem_buf;
}
printaddr(addr);
@ -159,8 +159,8 @@ print_int(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
SYS_FUNC(move_pages)
{
const kernel_ureg_t npages = tcp->u_arg[1];
kernel_ureg_t buf;
const kernel_ulong_t npages = tcp->u_arg[1];
kernel_ulong_t buf;
if (entering(tcp)) {
tprintf("%d, %" PRI_kru ", ", (int) tcp->u_arg[0], npages);

View File

@ -36,7 +36,7 @@
#ifdef HAVE_STRUCT___OLD_KERNEL_STAT
static void
print_old_kernel_stat(struct tcb *const tcp, const kernel_ureg_t addr)
print_old_kernel_stat(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct __old_kernel_stat buf;
if (umove_or_printaddr(tcp, addr, &buf))

View File

@ -54,7 +54,7 @@ pathmatch(const char *path)
* Return true if specified path (in user-space) matches.
*/
static int
upathmatch(struct tcb *const tcp, const kernel_ureg_t upath)
upathmatch(struct tcb *const tcp, const kernel_ulong_t upath)
{
char path[PATH_MAX + 1];
@ -248,8 +248,8 @@ pathtrace_match(struct tcb *tcp)
{
int i, j;
int nfds;
kernel_ureg_t *args;
kernel_ureg_t select_args[5];
kernel_ulong_t *args;
kernel_ulong_t select_args[5];
unsigned int oldselect_args[5];
unsigned int fdsize;
fd_set *fds;
@ -311,7 +311,7 @@ pathtrace_match(struct tcb *tcp)
{
struct pollfd fds;
unsigned nfds;
kernel_ureg_t start, cur, end;
kernel_ulong_t start, cur, end;
start = tcp->u_arg[0];
nfds = tcp->u_arg[1];

4
perf.c
View File

@ -61,7 +61,7 @@ free_pea_desc(void *pea_desc_ptr)
}
static int
fetch_perf_event_attr(struct tcb *const tcp, const kernel_ureg_t addr)
fetch_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct pea_desc *desc;
struct perf_event_attr *attr;
@ -118,7 +118,7 @@ fetch_perf_event_attr(struct tcb *const tcp, const kernel_ureg_t addr)
} while (0)
static void
print_perf_event_attr(struct tcb *const tcp, const kernel_ureg_t addr)
print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
{
static const char *precise_ip_desc[] = {
"arbitrary skid",

10
poll.c
View File

@ -50,7 +50,7 @@ print_pollfd(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
static void
decode_poll_entering(struct tcb *tcp)
{
const kernel_ureg_t addr = tcp->u_arg[0];
const kernel_ulong_t addr = tcp->u_arg[0];
const unsigned int nfds = tcp->u_arg[1];
struct pollfd fds;
@ -60,14 +60,14 @@ decode_poll_entering(struct tcb *tcp)
}
static int
decode_poll_exiting(struct tcb *const tcp, const kernel_ureg_t pts)
decode_poll_exiting(struct tcb *const tcp, const kernel_ulong_t pts)
{
struct pollfd fds;
const unsigned int nfds = tcp->u_arg[1];
const unsigned long size = sizeof(fds) * nfds;
const kernel_ureg_t start = tcp->u_arg[0];
const kernel_ureg_t end = start + size;
kernel_ureg_t cur;
const kernel_ulong_t start = tcp->u_arg[0];
const kernel_ulong_t end = start + size;
kernel_ulong_t cur;
const unsigned int max_printed =
abbrev(tcp) ? max_strlen : -1U;
unsigned int printed;

View File

@ -113,7 +113,7 @@ SYS_FUNC(prctl)
break;
if (syserror(tcp))
return 0;
tcp->auxstr = xlookup(pr_dumpable, (kernel_ureg_t) tcp->u_rval);
tcp->auxstr = xlookup(pr_dumpable, (kernel_ulong_t) tcp->u_rval);
return RVAL_STR;
case PR_GET_NAME:
@ -144,7 +144,7 @@ SYS_FUNC(prctl)
if (syserror(tcp) || tcp->u_rval == 0)
return 0;
tcp->auxstr = sprintflags("", secbits,
(kernel_ureg_t) tcp->u_rval);
(kernel_ulong_t) tcp->u_rval);
return RVAL_STR;
case PR_GET_TID_ADDRESS:
@ -180,7 +180,7 @@ SYS_FUNC(prctl)
if (syserror(tcp) || tcp->u_rval == 0)
return 0;
tcp->auxstr = sprintflags("", pr_fp_mode,
(kernel_ureg_t) tcp->u_rval);
(kernel_ulong_t) tcp->u_rval);
return RVAL_STR;
/* PR_TASK_PERF_EVENTS_* take no arguments. */
@ -330,7 +330,7 @@ SYS_FUNC(prctl)
if (syserror(tcp))
return 0;
tcp->auxstr = xlookup(pr_mce_kill_policy,
(kernel_ureg_t) tcp->u_rval);
(kernel_ulong_t) tcp->u_rval);
return tcp->auxstr ? RVAL_STR : RVAL_UDECIMAL;
case PR_SET_FP_MODE:

View File

@ -44,7 +44,7 @@ typedef struct mq_attr mq_attr_t;
#include MPERS_DEFS
MPERS_PRINTER_DECL(void, printmqattr, struct tcb *const tcp,
const kernel_ureg_t addr, const bool decode_flags)
const kernel_ulong_t addr, const bool decode_flags)
{
#if defined HAVE_MQUEUE_H || defined HAVE_LINUX_MQUEUE_H
mq_attr_t attr;

View File

@ -39,7 +39,7 @@ typedef struct msgbuf msgbuf_t;
#include MPERS_DEFS
MPERS_PRINTER_DECL(void, tprint_msgbuf, struct tcb *const tcp,
const kernel_ureg_t addr, const kernel_ureg_t count)
const kernel_ulong_t addr, const kernel_ulong_t count)
{
msgbuf_t msg;

View File

@ -36,7 +36,7 @@
#include "xlat/sigev_value.h"
MPERS_PRINTER_DECL(void, print_sigevent,
struct tcb *const tcp, const kernel_ureg_t addr)
struct tcb *const tcp, const kernel_ulong_t addr)
{
struct_sigevent sev;

View File

@ -56,7 +56,7 @@ print_statfs_number(const char *const prefix, const unsigned long long number)
}
void
print_struct_statfs(struct tcb *const tcp, const kernel_ureg_t addr)
print_struct_statfs(struct tcb *const tcp, const kernel_ulong_t addr)
{
#ifdef HAVE_STRUCT_STATFS
struct strace_statfs b;
@ -91,8 +91,8 @@ print_struct_statfs(struct tcb *const tcp, const kernel_ureg_t addr)
}
void
print_struct_statfs64(struct tcb *const tcp, const kernel_ureg_t addr,
const kernel_ureg_t size)
print_struct_statfs64(struct tcb *const tcp, const kernel_ulong_t addr,
const kernel_ulong_t size)
{
#ifdef HAVE_STRUCT_STATFS64
struct strace_statfs b;

View File

@ -65,7 +65,7 @@ print_timespec_t_utime(const timespec_t *t)
}
MPERS_PRINTER_DECL(void, print_timespec,
struct tcb *const tcp, const kernel_ureg_t addr)
struct tcb *const tcp, const kernel_ulong_t addr)
{
timespec_t t;
@ -76,7 +76,7 @@ MPERS_PRINTER_DECL(void, print_timespec,
}
MPERS_PRINTER_DECL(const char *, sprint_timespec,
struct tcb *const tcp, const kernel_ureg_t addr)
struct tcb *const tcp, const kernel_ulong_t addr)
{
timespec_t t;
static char buf[sizeof(timespec_fmt) + 3 * sizeof(t)];
@ -95,7 +95,7 @@ MPERS_PRINTER_DECL(const char *, sprint_timespec,
}
MPERS_PRINTER_DECL(void, print_timespec_utime_pair,
struct tcb *const tcp, const kernel_ureg_t addr)
struct tcb *const tcp, const kernel_ulong_t addr)
{
timespec_t t[2];
@ -110,7 +110,7 @@ MPERS_PRINTER_DECL(void, print_timespec_utime_pair,
}
MPERS_PRINTER_DECL(void, print_itimerspec,
struct tcb *const tcp, const kernel_ureg_t addr)
struct tcb *const tcp, const kernel_ulong_t addr)
{
timespec_t t[2];

View File

@ -47,7 +47,7 @@ MPERS_PRINTER_DECL(void, print_struct_timeval, const void *arg)
}
MPERS_PRINTER_DECL(void, print_timeval,
struct tcb *const tcp, const kernel_ureg_t addr)
struct tcb *const tcp, const kernel_ulong_t addr)
{
timeval_t t;
@ -68,7 +68,7 @@ print_timeval_item(struct tcb *tcp, void *elem_buf, size_t size, void *data)
}
MPERS_PRINTER_DECL(void, print_timeval_pair,
struct tcb *const tcp, const kernel_ureg_t addr)
struct tcb *const tcp, const kernel_ulong_t addr)
{
timeval_t t;
@ -77,7 +77,7 @@ MPERS_PRINTER_DECL(void, print_timeval_pair,
}
MPERS_PRINTER_DECL(const char *, sprint_timeval,
struct tcb *const tcp, const kernel_ureg_t addr)
struct tcb *const tcp, const kernel_ulong_t addr)
{
timeval_t t;
static char buf[sizeof(timeval_fmt) + 3 * sizeof(t)];
@ -96,7 +96,7 @@ MPERS_PRINTER_DECL(const char *, sprint_timeval,
}
MPERS_PRINTER_DECL(void, print_itimerval,
struct tcb *const tcp, const kernel_ureg_t addr)
struct tcb *const tcp, const kernel_ulong_t addr)
{
timeval_t t[2];
@ -119,7 +119,7 @@ print_timeval32_t(const timeval32_t *t)
}
void
print_timeval32(struct tcb *const tcp, const kernel_ureg_t addr)
print_timeval32(struct tcb *const tcp, const kernel_ulong_t addr)
{
timeval32_t t;
@ -130,7 +130,7 @@ print_timeval32(struct tcb *const tcp, const kernel_ureg_t addr)
}
void
print_timeval32_pair(struct tcb *const tcp, const kernel_ureg_t addr)
print_timeval32_pair(struct tcb *const tcp, const kernel_ulong_t addr)
{
timeval32_t t[2];
@ -145,7 +145,7 @@ print_timeval32_pair(struct tcb *const tcp, const kernel_ureg_t addr)
}
void
print_itimerval32(struct tcb *const tcp, const kernel_ureg_t addr)
print_itimerval32(struct tcb *const tcp, const kernel_ulong_t addr)
{
timeval32_t t[2];
@ -160,7 +160,7 @@ print_itimerval32(struct tcb *const tcp, const kernel_ureg_t addr)
}
const char *
sprint_timeval32(struct tcb *const tcp, const kernel_ureg_t addr)
sprint_timeval32(struct tcb *const tcp, const kernel_ulong_t addr)
{
timeval32_t t;
static char buf[sizeof(timeval_fmt) + 3 * sizeof(t)];

View File

@ -41,7 +41,7 @@ typedef struct timex struct_timex;
#include "xlat/adjtimex_status.h"
MPERS_PRINTER_DECL(int, print_timex,
struct tcb *const tcp, const kernel_ureg_t addr)
struct tcb *const tcp, const kernel_ulong_t addr)
{
struct_timex tx;

View File

@ -38,7 +38,7 @@ typedef struct rusage rusage_t;
#include MPERS_DEFS
MPERS_PRINTER_DECL(void, printrusage,
struct tcb *const tcp, const kernel_ureg_t addr)
struct tcb *const tcp, const kernel_ulong_t addr)
{
rusage_t ru;
@ -75,7 +75,7 @@ MPERS_PRINTER_DECL(void, printrusage,
#ifdef ALPHA
void
printrusage32(struct tcb *const tcp, const kernel_ureg_t addr)
printrusage32(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct rusage32 {
timeval32_t ru_utime; /* user time used */

View File

@ -239,7 +239,7 @@ printsiginfo(const siginfo_t *sip)
}
MPERS_PRINTER_DECL(void, printsiginfo_at,
struct tcb *const tcp, const kernel_ureg_t addr)
struct tcb *const tcp, const kernel_ulong_t addr)
{
siginfo_t si;
@ -255,7 +255,7 @@ print_siginfo_t(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
}
MPERS_PRINTER_DECL(void, print_siginfo_array, struct tcb *const tcp,
const kernel_ureg_t addr, const kernel_ureg_t len)
const kernel_ulong_t addr, const kernel_ulong_t len)
{
siginfo_t si;

View File

@ -57,7 +57,7 @@ static const struct xlat struct_user_offsets[] = {
};
static void
print_user_offset_addr(const kernel_ureg_t addr)
print_user_offset_addr(const kernel_ulong_t addr)
{
const struct xlat *x;
@ -74,7 +74,7 @@ print_user_offset_addr(const kernel_ureg_t addr)
} else {
--x;
tprintf("%s + %" PRI_kru,
x->str, addr - (kernel_ureg_t) x->val);
x->str, addr - (kernel_ulong_t) x->val);
}
} else {
tprints(x->str);
@ -83,10 +83,10 @@ print_user_offset_addr(const kernel_ureg_t addr)
SYS_FUNC(ptrace)
{
const kernel_ureg_t request = tcp->u_arg[0];
const kernel_ulong_t request = tcp->u_arg[0];
const int pid = tcp->u_arg[1];
const kernel_ureg_t addr = tcp->u_arg[2];
const kernel_ureg_t data = tcp->u_arg[3];
const kernel_ulong_t addr = tcp->u_arg[2];
const kernel_ulong_t data = tcp->u_arg[3];
if (entering(tcp)) {
/* request */

View File

@ -34,9 +34,9 @@ SYS_FUNC(process_vm_readv)
/* arg 1: pid */
tprintf("%d, ", (int) tcp->u_arg[0]);
} else {
kernel_ureg_t local_iovcnt = tcp->u_arg[2];
kernel_ureg_t remote_iovcnt = tcp->u_arg[4];
kernel_ureg_t flags = tcp->u_arg[5];
kernel_ulong_t local_iovcnt = tcp->u_arg[2];
kernel_ulong_t remote_iovcnt = tcp->u_arg[4];
kernel_ulong_t flags = tcp->u_arg[5];
/* arg 2: local iov */
tprint_iov_upto(tcp, local_iovcnt, tcp->u_arg[1],
@ -56,9 +56,9 @@ SYS_FUNC(process_vm_readv)
SYS_FUNC(process_vm_writev)
{
kernel_ureg_t local_iovcnt = tcp->u_arg[2];
kernel_ureg_t remote_iovcnt = tcp->u_arg[4];
kernel_ureg_t flags = tcp->u_arg[5];
kernel_ulong_t local_iovcnt = tcp->u_arg[2];
kernel_ulong_t remote_iovcnt = tcp->u_arg[4];
kernel_ulong_t flags = tcp->u_arg[5];
/* arg 1: pid */
tprintf("%d, ", (int) tcp->u_arg[0]);

2
ptp.c
View File

@ -34,7 +34,7 @@
int
ptp_ioctl(struct tcb *const tcp, const unsigned int code,
const kernel_ureg_t arg)
const kernel_ulong_t arg)
{
if (!verbose(tcp))
return RVAL_DECODED;

View File

@ -171,7 +171,7 @@ struct fs_quota_statv {
zero_extend_signed_to_ull((where).field))
static int
decode_cmd_data(struct tcb *tcp, uint32_t id, uint32_t cmd, kernel_ureg_t data)
decode_cmd_data(struct tcb *tcp, uint32_t id, uint32_t cmd, kernel_ulong_t data)
{
switch (cmd) {
case Q_QUOTAOFF:

View File

@ -49,7 +49,7 @@ sprint_rlim64(uint64_t lim)
}
static void
print_rlimit64(struct tcb *const tcp, const kernel_ureg_t addr)
print_rlimit64(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct rlimit_64 {
uint64_t rlim_cur;
@ -80,7 +80,7 @@ sprint_rlim32(uint32_t lim)
}
static void
print_rlimit32(struct tcb *const tcp, const kernel_ureg_t addr)
print_rlimit32(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct rlimit_32 {
uint32_t rlim_cur;
@ -94,7 +94,7 @@ print_rlimit32(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_rlimit(struct tcb *const tcp, const kernel_ureg_t addr)
decode_rlimit(struct tcb *const tcp, const kernel_ulong_t addr)
{
/*
* i386 is the only personality on X86_64 and X32

8
rtc.c
View File

@ -52,7 +52,7 @@ print_rtc_time(struct tcb *tcp, const struct rtc_time *rt)
}
static void
decode_rtc_time(struct tcb *const tcp, const kernel_ureg_t addr)
decode_rtc_time(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct rtc_time rt;
@ -61,7 +61,7 @@ decode_rtc_time(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_rtc_wkalrm(struct tcb *const tcp, const kernel_ureg_t addr)
decode_rtc_wkalrm(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct rtc_wkalrm wk;
@ -73,7 +73,7 @@ decode_rtc_wkalrm(struct tcb *const tcp, const kernel_ureg_t addr)
}
static void
decode_rtc_pll_info(struct tcb *const tcp, const kernel_ureg_t addr)
decode_rtc_pll_info(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct_rtc_pll_info pll;
@ -85,7 +85,7 @@ decode_rtc_pll_info(struct tcb *const tcp, const kernel_ureg_t addr)
}
MPERS_PRINTER_DECL(int, rtc_ioctl, struct tcb *const tcp,
const unsigned int code, const kernel_ureg_t arg)
const unsigned int code, const kernel_ulong_t arg)
{
switch (code) {
case RTC_ALM_READ:

View File

@ -39,7 +39,7 @@ SYS_FUNC(sched_getscheduler)
if (entering(tcp)) {
tprintf("%d", (int) tcp->u_arg[0]);
} else if (!syserror(tcp)) {
tcp->auxstr = xlookup(schedulers, (kernel_ureg_t) tcp->u_rval);
tcp->auxstr = xlookup(schedulers, (kernel_ulong_t) tcp->u_rval);
if (tcp->auxstr != NULL)
return RVAL_STR;
}
@ -94,7 +94,7 @@ SYS_FUNC(sched_rr_get_interval)
}
static void
print_sched_attr(struct tcb *const tcp, const kernel_ureg_t addr,
print_sched_attr(struct tcb *const tcp, const kernel_ulong_t addr,
unsigned int size)
{
struct {

20
scsi.c
View File

@ -51,7 +51,7 @@ print_uchar(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
}
static void
print_sg_io_buffer(struct tcb *const tcp, const kernel_ureg_t addr,
print_sg_io_buffer(struct tcb *const tcp, const kernel_ulong_t addr,
const unsigned int len)
{
unsigned char buf;
@ -61,7 +61,7 @@ print_sg_io_buffer(struct tcb *const tcp, const kernel_ureg_t addr,
}
static int
print_sg_io_v3_req(struct tcb *const tcp, const kernel_ureg_t arg)
print_sg_io_v3_req(struct tcb *const tcp, const kernel_ulong_t arg)
{
struct sg_io_hdr sg_io;
@ -96,7 +96,7 @@ print_sg_io_v3_req(struct tcb *const tcp, const kernel_ureg_t arg)
}
static void
print_sg_io_v3_res(struct tcb *const tcp, const kernel_ureg_t arg)
print_sg_io_v3_res(struct tcb *const tcp, const kernel_ulong_t arg)
{
struct sg_io_hdr sg_io;
@ -135,7 +135,7 @@ print_sg_io_v3_res(struct tcb *const tcp, const kernel_ureg_t arg)
#ifdef HAVE_LINUX_BSG_H
static int
print_sg_io_v4_req(struct tcb *const tcp, const kernel_ureg_t arg)
print_sg_io_v4_req(struct tcb *const tcp, const kernel_ulong_t arg)
{
struct sg_io_v4 sg_io;
@ -173,7 +173,7 @@ print_sg_io_v4_req(struct tcb *const tcp, const kernel_ureg_t arg)
}
static void
print_sg_io_v4_res(struct tcb *const tcp, const kernel_ureg_t arg)
print_sg_io_v4_res(struct tcb *const tcp, const kernel_ulong_t arg)
{
struct sg_io_v4 sg_io;
uint32_t din_len;
@ -211,14 +211,14 @@ print_sg_io_v4_res(struct tcb *const tcp, const kernel_ureg_t arg)
#else /* !HAVE_LINUX_BSG_H */
static int
print_sg_io_v4_req(struct tcb *const tcp, const kernel_ureg_t arg)
print_sg_io_v4_req(struct tcb *const tcp, const kernel_ulong_t arg)
{
tprints("...}");
return RVAL_DECODED | 1;
}
static void
print_sg_io_v4_res(struct tcb *const tcp, const kernel_ureg_t arg)
print_sg_io_v4_res(struct tcb *const tcp, const kernel_ulong_t arg)
{
}
@ -226,7 +226,7 @@ print_sg_io_v4_res(struct tcb *const tcp, const kernel_ureg_t arg)
static int
print_sg_io_req(struct tcb *const tcp, const uint32_t iid,
const kernel_ureg_t arg)
const kernel_ulong_t arg)
{
tprintf("{'%c', ", iid);
@ -244,7 +244,7 @@ print_sg_io_req(struct tcb *const tcp, const uint32_t iid,
static void
print_sg_io_res(struct tcb *const tcp, const uint32_t iid,
const kernel_ureg_t arg)
const kernel_ulong_t arg)
{
switch (iid) {
case 'S':
@ -258,7 +258,7 @@ print_sg_io_res(struct tcb *const tcp, const uint32_t iid,
int
scsi_ioctl(struct tcb *const tcp, const unsigned int code,
const kernel_ureg_t arg)
const kernel_ulong_t arg)
{
uint32_t iid;

Some files were not shown because too many files have changed in this diff Show More