OSDN Git Service

vmxnet3: Remove buf_info from device accessible structures
authorRonak Doshi <doshir@vmware.com>
Thu, 28 Jan 2021 02:08:16 +0000 (18:08 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 30 Jan 2021 05:07:03 +0000 (21:07 -0800)
commitde1da8bcf40564a2adada2d5d5426e05355f66e8
tree947f76c45089f8a1a83f8ce1c4680ea0cfcb0f45
parent6c13d75beee5313a38adab7e14365724e301886f
vmxnet3: Remove buf_info from device accessible structures

buf_info structures in RX & TX queues are private driver data that
do not need to be visible to the device.  Although there is physical
address and length in the queue descriptor that points to these
structures, their layout is not standardized, and device never looks
at them.

So lets allocate these structures in non-DMA-able memory, and fill
physical address as all-ones and length as zero in the queue
descriptor.

That should alleviate worries brought by Martin Radev in
https://lists.osuosl.org/pipermail/intel-wired-lan/Week-of-Mon-20210104/022829.html
that malicious vmxnet3 device could subvert SVM/TDX guarantees.

Signed-off-by: Petr Vandrovec <petr@vmware.com>
Signed-off-by: Ronak Doshi <doshir@vmware.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/vmxnet3/vmxnet3_drv.c
drivers/net/vmxnet3/vmxnet3_int.h