freebsd-skq/sys/dev/xen
Roger Pau Monné 2602ef7cfa xen: fix gntdev
Current interface to the gntdev in FreeBSD is wrong, and mostly worked
out of luck before the PTI FreeBSD fixes, when kernel and user-space
where sharing the same page tables.

On FreeBSD ioctls have the size of the passed struct encoded in the
ioctl number, because the generic ioctl handler in the OS takes care
of copying the data from user-space to kernel space, and then calls
the device specific ioctl handler. Thus using ioctl structs with
variable sizes is not possible.

The fix is to turn the array of structs at the end of
ioctl_gntdev_alloc_gref and ioctl_gntdev_map_grant_ref into pointers,
that can be properly accessed from the kernel gntdev driver using the
copyin/copyout functions. Note that this is exactly how it's done for
the privcmd driver.

Sponsored by:   Citrix Systems R&D
2018-05-02 10:19:17 +00:00
..
balloon
blkback Correct pseudo misspelling in sys/ comments 2018-02-23 18:15:50 +00:00
blkfront Revert r327828, r327949, r327953, r328016-r328026, r328041: 2018-01-21 15:42:36 +00:00
console
control sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
debug
evtchn
gntdev xen: fix gntdev 2018-05-02 10:19:17 +00:00
grant_table
netback Correct pseudo misspelling in sys/ comments 2018-02-23 18:15:50 +00:00
netfront sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
pci
pcifront sys/dev: further adoption of SPDX licensing ID tags. 2017-11-20 19:36:21 +00:00
privcmd
pvcpu
timer sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
xenpci sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
xenstore