summaryrefslogtreecommitdiff
path: root/userfaultfd.c
diff options
context:
space:
mode:
authorEugene Syromyatnikov <evgsyr@gmail.com>2017-08-14 19:25:13 +0200
committerEugene Syromyatnikov <evgsyr@gmail.com>2017-08-28 02:33:20 +0200
commit3ca301fff889bf71a1c6b8a5116945335147640e (patch)
treedf17c385d24a6b2a83d75ad68151bebc6c2ef6cb /userfaultfd.c
parent6e367ed223693cead1c1ea8205addbf08c7dc71e (diff)
downloadstrace-3ca301fff889bf71a1c6b8a5116945335147640e.tar.gz
Replace return 1 ioctl sub-decoder hack with proper flag
* defs.h (RVAL_IOCTL_PARSED): Introduce new flag for ioctl sub-decoders * to signalise that they have successfully printed argument. * ioctl.c (SYS_FUNC(ioctl)): Check for RVAL_IOCTL_PARSED flag, remove un-set it before returning the value. * block.c: Use RVAL_IOCTL_PARSED instead of 1. * btrfs.c: Likewise. * dm.c: Likewise. * evdev.c: Likewise. * file_ioctl.c: Likewise. * fs_x_ioctl.c: Likewise. * hdio.c: Likewise. * loop.c: Likewise. * mtd.c: Likewise. * nsfs.c: Likewise. * print_sg_req_info.c: Likewise. * ptp.c: Likewise. * rtc.c: Likewise. * scsi.c: Likewise. * sg_io_v3.c: Likewise. * sg_io_v4.c: Likewise. * sock.c: Likewise. * term.c: Likewise. * ubi.c: Likewise. * userfaultfd.c: Likewise. * v4l2.c: Likewise.
Diffstat (limited to 'userfaultfd.c')
-rw-r--r--userfaultfd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/userfaultfd.c b/userfaultfd.c
index 150d98fbd..94ed20a26 100644
--- a/userfaultfd.c
+++ b/userfaultfd.c
@@ -114,7 +114,7 @@ uffdio_ioctl(struct tcb *const tcp, const unsigned int code,
if (entering(tcp)) {
tprints(", ");
if (umove_or_printaddr(tcp, arg, &uc))
- return RVAL_DECODED | 1;
+ return RVAL_DECODED | RVAL_IOCTL_PARSED;
PRINT_FIELD_X("{", uc, dst);
PRINT_FIELD_X(", ", uc, src);
PRINT_FIELD_X(", ", uc, len);
@@ -138,7 +138,7 @@ uffdio_ioctl(struct tcb *const tcp, const unsigned int code,
if (entering(tcp)) {
tprints(", ");
if (umove_or_printaddr(tcp, arg, &ur))
- return RVAL_DECODED | 1;
+ return RVAL_DECODED | RVAL_IOCTL_PARSED;
PRINT_FIELD_UFFDIO_RANGE("{", ur, range);
PRINT_FIELD_FLAGS(", ", ur, mode,
uffd_register_mode_flags,
@@ -176,7 +176,7 @@ uffdio_ioctl(struct tcb *const tcp, const unsigned int code,
if (entering(tcp)) {
tprints(", ");
if (umove_or_printaddr(tcp, arg, &uz))
- return RVAL_DECODED | 1;
+ return RVAL_DECODED | RVAL_IOCTL_PARSED;
PRINT_FIELD_UFFDIO_RANGE("{", uz, range);
PRINT_FIELD_FLAGS(", ", uz, mode, uffd_zeropage_flags,
"UFFDIO_ZEROPAGE_???");
@@ -196,6 +196,6 @@ uffdio_ioctl(struct tcb *const tcp, const unsigned int code,
return RVAL_DECODED;
}
- return RVAL_DECODED | 1;
+ return RVAL_DECODED | RVAL_IOCTL_PARSED;
}
#endif /* HAVE_LINUX_USERFAULTFD_H */