diff options
author | masahiro31.yamada@kioxia.com <masahiro31.yamada@kioxia.com> | 2020-03-05 14:13:29 +0300 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2020-03-25 22:51:55 +0300 |
commit | c225b610311bc5695d952cd3590136f26199a227 (patch) | |
tree | b5f6aff8f5bd09bbf339f4828f3eb38e6d480392 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | e90d172b11b845b0f2caa9422c2f9d3ef59af575 (diff) | |
download | linux-c225b610311bc5695d952cd3590136f26199a227.tar.xz |
nvme: Add compat_ioctl handler for NVME_IOCTL_SUBMIT_IO
Currently 32 bit application gets ENOTTY when it calls
compat_ioctl with NVME_IOCTL_SUBMIT_IO in 64 bit kernel.
The cause is that the results of sizeof(struct nvme_user_io),
which is used to define NVME_IOCTL_SUBMIT_IO,
are not same between 32 bit compiler and 64 bit compiler.
* 32 bit: the result of sizeof nvme_user_io is 44.
* 64 bit: the result of sizeof nvme_user_io is 48.
64 bit compiler seems to add 32 bit padding for multiple of 8 bytes.
This patch adds a compat_ioctl handler.
The handler replaces NVME_IOCTL_SUBMIT_IO32 with NVME_IOCTL_SUBMIT_IO
in case 32 bit application calls compat_ioctl for submit in 64 bit kernel.
Then, it calls nvme_ioctl as usual.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Masahiro Yamada (KIOXIA) <masahiro31.yamada@kioxia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions