lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon,  7 Sep 2015 14:26:59 +0000
From:	Olaf Hering <olaf@...fle.de>
To:	kys@...rosoft.com, gregkh@...uxfoundation.org,
	haiyangz@...rosoft.com
Cc:	linux-kernel@...r.kernel.org, devel@...uxdriverproject.org,
	Olaf Hering <olaf@...fle.de>
Subject: [PATCH 0/4] hv: utils: propagate state to interrupt thread

The Copy-VMFile cmdlet on the host may fail because the guest fcopy
driver state machine gets out of sync. This happens because the ->state
and ->context variables are accessed by the main thread and from
interrupt context. If an interrupt happens between fcopy_respond_to_host
and hv_poll_channel in fcopy_write, then hv_fcopy_onchannelcallback
called from that interrupt sees still state HVUTIL_USERSPACE_RECV. It
updates the context, but fcopy_write will not notice that update and
hv_poll_channel gets called with an empty context.  As a result
hv_fcopy_daemon gets no more data. After a timeout Copy-VMFile fails
with timeout.

In my initial testing for a fix I put a "mb()" after the last .state
change in fcopy_write. But this series implementes read/write memory
barriers as needed. Let me know if this is overdoing things.

Olaf

Olaf Hering (4):
  hv: add helpers to handle hv_util device state
  hv: fcopy: use wrapper to propate state
  hv: kvp: use wrapper to propate state
  hv: vss: use wrapper to propate state

 drivers/hv/hv_fcopy.c     | 36 ++++++++++++++++++++----------------
 drivers/hv/hv_kvp.c       | 38 +++++++++++++++++++++-----------------
 drivers/hv/hv_snapshot.c  | 37 ++++++++++++++++++++-----------------
 drivers/hv/hyperv_vmbus.h | 12 ++++++++++++
 4 files changed, 73 insertions(+), 50 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ