From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>, xen-devel@lists.xen.org
Cc: tamas@tklengyel.com, keir@xen.org, jbeulich@suse.com
Subject: Re: [PATCH] x86 vm_event: reset monitor in vm_event_cleanup_domain()
Date: Wed, 27 Jan 2016 19:45:01 +0000 [thread overview]
Message-ID: <56A91E3D.3000609@citrix.com> (raw)
In-Reply-To: <1453923738-4919-1-git-send-email-rcojocaru@bitdefender.com>
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)
next prev parent reply other threads:[~2016-01-27 19:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2016-01-27 19:58 ` Tamas K Lengyel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56A91E3D.3000609@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=rcojocaru@bitdefender.com \
--cc=tamas@tklengyel.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.