From: David Miller <davem@davemloft.net> Date: 2018-03-16 19:30:20
Although the top level ioctls are probably size and layout compatible,
I do not think that the deeper ioctls can be called by compat binaries
without some translations in order for them to work.
On Fri, Mar 16, 2018 at 12:30 PM, David Miller [off-list ref] wrote:
Although the top level ioctls are probably size and layout compatible,
I do not think that the deeper ioctls can be called by compat binaries
without some translations in order for them to work.
Ok, thanks -- I have only tested VHOST_VSOCK_SET_GUEST_CID and
VHOST_VSOCK_SET_RUNNING but by deeper ioctls I think you might mean
the ioctls under vhost_dev_ioctl() and vhost_vring_ioctl()?
On Fri, Mar 16, 2018 at 12:30 PM, David Miller [off-list ref] wrote:
quoted
Although the top level ioctls are probably size and layout compatible,
I do not think that the deeper ioctls can be called by compat binaries
without some translations in order for them to work.
Ok, thanks -- I have only tested VHOST_VSOCK_SET_GUEST_CID and
VHOST_VSOCK_SET_RUNNING but by deeper ioctls I think you might mean
the ioctls under vhost_dev_ioctl() and vhost_vring_ioctl()?
From: Stefan Hajnoczi <hidden> Date: 2018-03-22 09:25:36
On Fri, Mar 16, 2018 at 7:30 PM, David Miller [off-list ref] wrote:
Although the top level ioctls are probably size and layout compatible,
I do not think that the deeper ioctls can be called by compat binaries
without some translations in order for them to work.
I audited the vhost ioctl code when reviewing this patch and was
unable to find anything that would break for a 32-bit userspace
process.
drivers/vhost/net.c does the same thing already, which doesn't prove
it's correct but makes me more confident I didn't miss something while
auditing the vhost ioctl code.
Did you have a specific ioctl in mind?
Stefan
On Thu, Mar 22, 2018 at 2:25 AM, Stefan Hajnoczi [off-list ref] wrote:
On Fri, Mar 16, 2018 at 7:30 PM, David Miller [off-list ref] wrote:
quoted
Although the top level ioctls are probably size and layout compatible,
I do not think that the deeper ioctls can be called by compat binaries
without some translations in order for them to work.
I audited the vhost ioctl code when reviewing this patch and was
unable to find anything that would break for a 32-bit userspace
process.
drivers/vhost/net.c does the same thing already, which doesn't prove
it's correct but makes me more confident I didn't miss something while
auditing the vhost ioctl code.
Did you have a specific ioctl in mind?
I think he means that we need to use the compat_ptr macro on any other
pointers we get from userspace in those other ioctls. For most
architectures this macro doesn't seem to do much but it does on some
-- I think s390 modifies the pointer.
From: David Miller <davem@davemloft.net> Date: 2018-03-25 20:50:55
From: Stefan Hajnoczi <redacted>
Date: Thu, 22 Mar 2018 09:25:35 +0000
On Fri, Mar 16, 2018 at 7:30 PM, David Miller [off-list ref] wrote:
quoted
Although the top level ioctls are probably size and layout compatible,
I do not think that the deeper ioctls can be called by compat binaries
without some translations in order for them to work.
I audited the vhost ioctl code when reviewing this patch and was
unable to find anything that would break for a 32-bit userspace
process.
drivers/vhost/net.c does the same thing already, which doesn't prove
it's correct but makes me more confident I didn't miss something while
auditing the vhost ioctl code.
Did you have a specific ioctl in mind?
I walked over the vhost ioctl datastructures and they all appear like
they should be compatible.
So I guess it won't be a problem after all.