* Patch "Drivers: hv: vmbus: Close timing hole that can corrupt per-cpu page" has been added to the 4.11-stable tree
@ 2017-07-18 16:16 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-07-18 16:16 UTC (permalink / raw)
To: mikelley, gregkh, kys; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
Drivers: hv: vmbus: Close timing hole that can corrupt per-cpu page
to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drivers-hv-vmbus-close-timing-hole-that-can-corrupt-per-cpu-page.patch
and it can be found in the queue-4.11 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 13b9abfc92be7c4454bff912021b9f835dea6e15 Mon Sep 17 00:00:00 2001
From: Michael Kelley <mikelley@microsoft.com>
Date: Thu, 18 May 2017 10:46:07 -0700
Subject: Drivers: hv: vmbus: Close timing hole that can corrupt per-cpu page
From: Michael Kelley <mikelley@microsoft.com>
commit 13b9abfc92be7c4454bff912021b9f835dea6e15 upstream.
Extend the disabling of preemption to include the hypercall so that
another thread can't get the CPU and corrupt the per-cpu page used
for hypercall arguments.
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hv/hv.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -82,10 +82,15 @@ int hv_post_message(union hv_connection_
aligned_msg->message_type = message_type;
aligned_msg->payload_size = payload_size;
memcpy((void *)aligned_msg->payload, payload, payload_size);
- put_cpu_ptr(hv_cpu);
status = hv_do_hypercall(HVCALL_POST_MESSAGE, aligned_msg, NULL);
+ /* Preemption must remain disabled until after the hypercall
+ * so some other thread can't get scheduled onto this cpu and
+ * corrupt the per-cpu post_msg_page
+ */
+ put_cpu_ptr(hv_cpu);
+
return status & 0xFFFF;
}
Patches currently in stable-queue which might be from mikelley@microsoft.com are
queue-4.11/drivers-hv-vmbus-close-timing-hole-that-can-corrupt-per-cpu-page.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-18 16:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-18 16:16 Patch "Drivers: hv: vmbus: Close timing hole that can corrupt per-cpu page" has been added to the 4.11-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).