lkml.org 
[lkml]   [2014]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 1/1] Drivers: hv: Implement the file copy service
Date


> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Thursday, January 09, 2014 12:09 PM
> To: KY Srinivasan
> Cc: olaf@aepfle.de; gregkh@linuxfoundation.org; jasowang@redhat.com; linux-
> kernel@vger.kernel.org; apw@canonical.com; devel@linuxdriverproject.org
> Subject: Re: [PATCH 1/1] Drivers: hv: Implement the file copy service
>
> We've had this discussion before where you urge me to trust the host...

I am just implementing the protocol specification given by the host. If I cannot trust the
specified protocol, I am not sure what else can be done here.

>
> Problem: This code is racy.
> Solution: The host will only send one message at a time.

The code is not racy given the protocol that is specified. While I could have
blindly trusted the host, this driver code actually reads only one packet at a time.
When we get a transaction from the host, we do not process any more transactions until
the current transaction is fully processed. So what is the race condition here?

>
> Now I have to audit the user space code on the host and I don't feel
> like doing that so you win.

I don't think you need to audit any code.

>
> I wish we had a better way to do IPC. If kdbus were ready, that might
> have worked for this, and it's a better solution because both sender and
> reciever code will be written in a less trusting way.

I am not sure how kdbus would help you here. We are talking about communicating
between the host and the guest here.

K. Y
>
> regards,
> dan carpenter



\
 
 \ /
  Last update: 2014-01-09 22:41    [W:0.053 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site