Thread (14 messages) 14 messages, 3 authors, 2020-12-06

Re: [PATCH v2 4/7] Drivers: hv: vmbus: Copy the hv_message object in vmbus_on_msg_dpc()

From: Andrea Parri <parri.andrea@gmail.com>
Date: 2020-12-06 21:34:07
Also in: lkml

On Sun, Dec 06, 2020 at 06:39:39PM +0000, Michael Kelley wrote:
From: Andrea Parri (Microsoft) <parri.andrea@gmail.com> Sent: Wednesday, December 2, 2020 1:22 AM
quoted
The hv_message object is in memory shared with the host.  To prevent
an erroneous or a malicious host from 'corrupting' such object, copy
the object into private memory.
[...]
But if we're going to just make a copy at the start and use the copy for
everything, then the motivation for the changes in Patches 2 and 3 goes
away.  The double-fetch problem is solved entirely by Patch 4.  The
changes in Patches 2 and 3 *are* nice for simplifying the code, but
that's all.  The code simplification is still useful as prep to reduce the
number of references to "msg" that have to be changed to "msg_copy",
but the commit message should be changed to reflect that, rather than
to eliminate double fetches.
I'm okay with this: I will revisit the commit messages of 2/3, maybe
squash those 'simplifications' into a single patch, and then 'solve'
/guard against the double fetch problem with 4.

Thanks,
  Andrea
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help