summaryrefslogtreecommitdiffstats
path: root/tools/perf/MANIFEST
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-08-01 16:46:36 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-08-01 18:04:52 +0200
commit8ff69577075e0321ef25d3afcb293db39a31342a (patch)
tree2f481595b6b6731d2682cbdcbb88671fd05f3580 /tools/perf/MANIFEST
parentperf trace beautify ioctl: Beautify KVM ioctl's 'cmd' arg (diff)
downloadlinux-8ff69577075e0321ef25d3afcb293db39a31342a.tar.xz
linux-8ff69577075e0321ef25d3afcb293db39a31342a.zip
perf trace beauty ioctl: Pass _IOC_DIR to the per _IOC_TYPE scnprintf
Not all subsystems use the fact that we may have the same _IOC_NR for different _IOC_DIR, as in the end it'll result in a different ioctl number. So, for instance, vhost virtio has: #define VHOST_GET_FEATURES _IOR(VHOST_VIRTIO, 0x00, __u64) #define VHOST_SET_FEATURES _IOW(VHOST_VIRTIO, 0x00, __u64) So same _IOC_NR (0x00) but different _IOC_DIR (R versus W), but it also have: #define VHOST_SET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x13, struct vhost_vring_state) #define VHOST_GET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x14, struct vhost_vring_state) A "get" operation that uses a "W" _IOC_DIR, and its implementation, uses copy_to_user, it should've probably been _IOR(). Then: /* Base value where queue looks for available descriptors */ #define VHOST_SET_VRING_BASE _IOW(VHOST_VIRTIO, 0x12, struct vhost_vring_state) /* Get accessor: reads index, writes value in num */ #define VHOST_GET_VRING_BASE _IOWR(VHOST_VIRTIO, 0x12, struct vhost_vring_state) So we'll need to use _IOC_DIR() to disambiguate the VHOST_VIRTIO ioctl bautifier. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-rq6q717ql7j2z7kuccafgq84@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/MANIFEST')
0 files changed, 0 insertions, 0 deletions