* [PATCH] x86 vm_event: reset monitor in vm_event_cleanup_domain()
@ 2016-01-27 19:42 Razvan Cojocaru
2016-01-27 19:45 ` Andrew Cooper
2016-01-27 19:58 ` Tamas K Lengyel
0 siblings, 2 replies; 3+ messages in thread
From: Razvan Cojocaru @ 2016-01-27 19:42 UTC (permalink / raw)
To: xen-devel; +Cc: andrew.cooper3, tamas, keir, Razvan Cojocaru, jbeulich
It is currently possible to leave a monitor flag enabled even
after vm_event_cleanup_domain() has been called, potentially
leading to a crash in hvm_msr_write_intercept() and hvm_set_crX()
(when v->arch.vm_event has become NULL, but the corresponding
corresponding v->domain->arch.monitor flag is non-zero).
This patch zeroes out arch.monitor in vm_event_cleanup_domain().
Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
---
xen/arch/x86/vm_event.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/arch/x86/vm_event.c b/xen/arch/x86/vm_event.c
index 9677ecc..08d678a 100644
--- a/xen/arch/x86/vm_event.c
+++ b/xen/arch/x86/vm_event.c
@@ -56,6 +56,7 @@ void vm_event_cleanup_domain(struct domain *d)
}
d->arch.mem_access_emulate_each_rep = 0;
+ memset(&d->arch.monitor, 0, sizeof(d->arch.monitor));
}
void vm_event_toggle_singlestep(struct domain *d, struct vcpu *v)
--
2.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] x86 vm_event: reset monitor in vm_event_cleanup_domain()
2016-01-27 19:42 [PATCH] x86 vm_event: reset monitor in vm_event_cleanup_domain() Razvan Cojocaru
@ 2016-01-27 19:45 ` Andrew Cooper
2016-01-27 19:58 ` Tamas K Lengyel
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2016-01-27 19:45 UTC (permalink / raw)
To: Razvan Cojocaru, xen-devel; +Cc: tamas, keir, jbeulich
On 27/01/2016 19:42, Razvan Cojocaru wrote:
> It is currently possible to leave a monitor flag enabled even
> after vm_event_cleanup_domain() has been called, potentially
> leading to a crash in hvm_msr_write_intercept() and hvm_set_crX()
> (when v->arch.vm_event has become NULL, but the corresponding
> corresponding v->domain->arch.monitor flag is non-zero).
> This patch zeroes out arch.monitor in vm_event_cleanup_domain().
>
> Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> xen/arch/x86/vm_event.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/xen/arch/x86/vm_event.c b/xen/arch/x86/vm_event.c
> index 9677ecc..08d678a 100644
> --- a/xen/arch/x86/vm_event.c
> +++ b/xen/arch/x86/vm_event.c
> @@ -56,6 +56,7 @@ void vm_event_cleanup_domain(struct domain *d)
> }
>
> d->arch.mem_access_emulate_each_rep = 0;
> + memset(&d->arch.monitor, 0, sizeof(d->arch.monitor));
> }
>
> void vm_event_toggle_singlestep(struct domain *d, struct vcpu *v)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86 vm_event: reset monitor in vm_event_cleanup_domain()
2016-01-27 19:42 [PATCH] x86 vm_event: reset monitor in vm_event_cleanup_domain() Razvan Cojocaru
2016-01-27 19:45 ` Andrew Cooper
@ 2016-01-27 19:58 ` Tamas K Lengyel
1 sibling, 0 replies; 3+ messages in thread
From: Tamas K Lengyel @ 2016-01-27 19:58 UTC (permalink / raw)
To: Razvan Cojocaru; +Cc: Andrew Cooper, Keir Fraser, Jan Beulich, Xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1104 bytes --]
On Wed, Jan 27, 2016 at 12:42 PM, Razvan Cojocaru <rcojocaru@bitdefender.com
> wrote:
> It is currently possible to leave a monitor flag enabled even
> after vm_event_cleanup_domain() has been called, potentially
> leading to a crash in hvm_msr_write_intercept() and hvm_set_crX()
> (when v->arch.vm_event has become NULL, but the corresponding
> corresponding v->domain->arch.monitor flag is non-zero).
> This patch zeroes out arch.monitor in vm_event_cleanup_domain().
>
> Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
>
Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
> ---
> xen/arch/x86/vm_event.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/xen/arch/x86/vm_event.c b/xen/arch/x86/vm_event.c
> index 9677ecc..08d678a 100644
> --- a/xen/arch/x86/vm_event.c
> +++ b/xen/arch/x86/vm_event.c
> @@ -56,6 +56,7 @@ void vm_event_cleanup_domain(struct domain *d)
> }
>
> d->arch.mem_access_emulate_each_rep = 0;
> + memset(&d->arch.monitor, 0, sizeof(d->arch.monitor));
> }
>
> void vm_event_toggle_singlestep(struct domain *d, struct vcpu *v)
> --
> 2.7.0
>
>
[-- Attachment #1.2: Type: text/html, Size: 1836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-27 19:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-27 19:42 [PATCH] x86 vm_event: reset monitor in vm_event_cleanup_domain() Razvan Cojocaru
2016-01-27 19:45 ` Andrew Cooper
2016-01-27 19:58 ` Tamas K Lengyel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.