|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/shim: zap runstate and time area handles during shutdown
commit 826da6e30cf37a22b3f32dba33477856125df91b
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Oct 2 17:11:19 2023 +0200
Commit: Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Thu Oct 5 14:08:26 2023 +0100
x86/shim: zap runstate and time area handles during shutdown
While likely the guest would just re-register the same areas after
a possible resume, let's not take this for granted and avoid the risk of
otherwise corrupting guest memory.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Release-acked-by: Henry Wang <Henry.Wang@xxxxxxx>
---
xen/arch/x86/pv/shim.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c
index ca0e639db3..7e4bacf7ae 100644
--- a/xen/arch/x86/pv/shim.c
+++ b/xen/arch/x86/pv/shim.c
@@ -385,6 +385,10 @@ int pv_shim_shutdown(uint8_t reason)
/* Unmap guest vcpu_info pages. */
unmap_vcpu_info(v);
+ /* Zap runstate and time area handles. */
+ set_xen_guest_handle(runstate_guest(v), NULL);
+ set_xen_guest_handle(v->arch.time_info_guest, NULL);
+
/* Reset the periodic timer to the default value. */
vcpu_set_periodic_timer(v, MILLISECS(10));
/* Stop the singleshot timer. */
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |