[PATCH] drm/i915/gvt: clean up vGPU resource r/w length

Zhenyu Wang zhenyuw at linux.intel.com
Mon Aug 7 07:48:11 UTC 2017


On 2017.08.07 13:50:47 +0800, Du, Changbin wrote:
> 
> zhenyu/xiong, how about move such function to device module so xengt and kvmgt can
> share this snippet?
>

MPT hooks already have specific ones for mmio/cfg access, this is specific
for VFIO ioctl interface.

> And I have a concern for opening larger (> 4 bytes) MMIO access - The tracked
> registers are all handled by one DWORD, so access larger MMIO (8bytes for example)
> only the handler of first DWORD executed.

That seems to me as handler issue that doesn't have correct range covered.

> What's more, there's a securtity issue
> that acess the last MMIO with >4 bytes can lead to memroy overflow. The first
> concern is not important since BSpec has required for 32bit access, but the
> second one should take account.

As chatted on irc, with Xiong patch, we still need bound check for this.

thanks

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170807/88df5a59/attachment.sig>


More information about the intel-gvt-dev mailing list