lkml.org 
[lkml]   [2021]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Resend RFC PATCH V2 08/12] UIO/Hyper-V: Not load UIO HV driver in the isolation VM.
From
Date


On 4/14/2021 11:45 PM, Greg KH wrote:
> On Wed, Apr 14, 2021 at 10:49:41AM -0400, Tianyu Lan wrote:
>> From: Tianyu Lan <Tianyu.Lan@microsoft.com>
>>
>> UIO HV driver should not load in the isolation VM for security reason.
>> Return ENOTSUPP in the hv_uio_probe() in the isolation VM.
>>
>> Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
>> ---
>> drivers/uio/uio_hv_generic.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c
>> index 0330ba99730e..678b021d66f8 100644
>> --- a/drivers/uio/uio_hv_generic.c
>> +++ b/drivers/uio/uio_hv_generic.c
>> @@ -29,6 +29,7 @@
>> #include <linux/hyperv.h>
>> #include <linux/vmalloc.h>
>> #include <linux/slab.h>
>> +#include <asm/mshyperv.h>
>>
>> #include "../hv/hyperv_vmbus.h"
>>
>> @@ -241,6 +242,10 @@ hv_uio_probe(struct hv_device *dev,
>> void *ring_buffer;
>> int ret;
>>
>> + /* UIO driver should not be loaded in the isolation VM.*/
>> + if (hv_is_isolation_supported())
>> + return -ENOTSUPP;
>> +
>> /* Communicating with host has to be via shared memory not hypercall */
>> if (!channel->offermsg.monitor_allocated) {
>> dev_err(&dev->device, "vmbus channel requires hypercall\n");
>> --
>> 2.25.1
>>
>
> Again you send out known-wrong patches?
>
> :(
>
Sorry for noise. Will fix this next version and I think we should make
sure user space driver to check data from host. This patch will be removed.

\
 
 \ /
  Last update: 2021-04-15 15:11    [W:0.081 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site