Messages in this thread | | | From | KY Srinivasan <> | Subject | RE: [PATCH 1/1] Drivers: hv: Implement the file copy service | Date | Thu, 9 Jan 2014 21:05:05 +0000 |
| |
> -----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
| |