[PATCH v2 0/2] nvme: compat ioctl fixes

From: Nick Bowler
Date: Sat Mar 28 2020 - 01:21:25 EST


On review of my earlier patch to correct how 32-bit addresses in the
NVME_IOCTL_ADMIN_CMD compat ioctl (via nvme_user_cmd function) were
handled, similar problems were noted in the nvme_user_cmd64 function.

Additionally, NVME_IOCTL_SUBMIT_IO is busted in the compat case because
it not only has the same 32-bit address problem, but additionally the
corresponding nvme_user_io structure padding differs between 32-bit and
64-bit x86 (and some other arches presumably have the same problem).

Note that since I do not know of any users of the NVME_IOCTL_IO64_CMD
or NVME_IOCTL_ADMIN64_CMD ioctls, I have not tested the changes to the
nvme_user_cmd64 function (but these changes are virtually identical
to those done in the other functions function).

Nick Bowler (2):
nvme: Fix compat NVME_IOCTL_SUBMIT_IO numbering
nvme: Fix compat address handling in several ioctls

drivers/nvme/host/core.c | 47 ++++++++++++++++++++++++---------
include/uapi/linux/nvme_ioctl.h | 25 ++++++++++++++++++
2 files changed, 59 insertions(+), 13 deletions(-)

--
2.24.1