History

virt: vbox: Fix VBGL_IOCTL_VMMDEV_REQUEST_BIG and _LOG req numbers to match upstream

Until this commit the mainline kernel version (this version) of the vboxguest module contained a bug where it defined VBGL_IOCTL_VMMDEV_REQUEST_BIG and VBGL_IOCTL_LOG using _IOC(_IOC_READ | _IOC_WRITE, 'V', ...) instead of _IO(V, ...) as the out of tree VirtualBox upstream version does. Since the VirtualBox userspace bits are always built against VirtualBox upstream's headers, this means that so far the mainline kernel version of the vboxguest module has been failing these 2 ioctls with -ENOTTY. I guess that VBGL_IOCTL_VMMDEV_REQUEST_BIG is never used causing us to not hit that one and sofar the vboxguest driver has failed to actually log any log messages passed it through VBGL_IOCTL_LOG. This commit changes the VBGL_IOCTL_VMMDEV_REQUEST_BIG and VBGL_IOCTL_LOG defines to match the out of tree VirtualBox upstream vboxguest version, while keeping compatibility with the old wrong request defines so as to not break the kernel ABI in case someone has been using the old request defines.

Hans de Goede committed 6 years ago

Commit f794db61 parent bcf003b4 files · +22 −4Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/vboxguest.h+2−2
@@ -103,7 +103,7 @@ VMMDEV_ASSERT_SIZE(vbg_ioctl_driver_version_info, 24 + 20); · 102 unmodified lines
103 103
104 104
105/* IOCTL to perform a VMM Device request larger then 1KB. */105/* IOCTL to perform a VMM Device request larger then 1KB. */
106#define VBG_IOCTL_VMMDEV_REQUEST_BIG _IOC(_IOC_READ | _IOC_WRITE, 'V', 3, 0)106#define VBG_IOCTL_VMMDEV_REQUEST_BIG _IO('V', 3)
107 107
108 108
109/** VBG_IOCTL_HGCM_CONNECT data structure. */109/** VBG_IOCTL_HGCM_CONNECT data structure. */
@@ -198,7 +198,7 @@ struct vbg_ioctl_log { · 88 unmodified lines
198 } u;198 } u;
199};199};
200 200
201#define VBG_IOCTL_LOG(s) _IOC(_IOC_READ | _IOC_WRITE, 'V', 9, s)201#define VBG_IOCTL_LOG(s) _IO('V', 9)
202 202
203 203
204/** VBG_IOCTL_WAIT_FOR_EVENTS data structure. */204/** VBG_IOCTL_WAIT_FOR_EVENTS data structure. */