]> xenbits.xensource.com Git - xen.git/commit
sched: don't let XEN_RUNSTATE_UPDATE leak into vcpu_runstate_get()
authorJuergen Gross <jgross@suse.com>
Thu, 26 Sep 2019 16:04:09 +0000 (18:04 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 26 Sep 2019 16:04:09 +0000 (18:04 +0200)
commitf28c4c4c10bdacb1e49cc6e9de57eb1f973cbdf6
tree62ece742dd234413fb97546f6cd1abf0a4665b60
parent62529f16c8a26365a653e4e6f4554e4ac69cdcd9
sched: don't let XEN_RUNSTATE_UPDATE leak into vcpu_runstate_get()

vcpu_runstate_get() should never return a state entry time with
XEN_RUNSTATE_UPDATE set. To avoid this let update_runstate_area()
operate on a local runstate copy.

As it is required to first set the XEN_RUNSTATE_UPDATE indicator in
guest memory, then update all the runstate data, and then at last
clear the XEN_RUNSTATE_UPDATE again it is much less effort to have
a local copy of the runstate data instead of keeping only a copy of
state_entry_time.

This problem was introduced with commit 2529c850ea48f036 ("add update
indicator to vcpu_runstate_info").

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/domain.c
xen/arch/x86/domain.c