Reset runstate_guest handles on soft reset
PATCH 1/1 Reset runstate_guest handles on soft reset
runstate_guest handles need to be reset to prevent update_runstate_area() corrupting guest's memory after we resume the guest.
Signed-off-by Vitaly Kuznetsov <[email protected]>
--- xen/common/domain.c | 3 +++ 1 file changed, 3 insertions(+)
xen/common/domain.c +3 -0
@@ -1074,7 +1074,10 @@ int domain_soft_reset(struct domain *d)grant_table_warn_active_grants (d); for_each_vcpu ( d, v ) + { +memset (&runstate_guest (v),0 ,sizeof (runstate_guest (v)));unmap_vcpu_info (v); + } rc =arch_domain_soft_reset (d);if ( !rc )
Signature · 1 line
2.5.0
xen/common/domain.c int domain_soft_reset(struct domain *d) · line 1080
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 28.01.16 at 10:34, <[email protected]> wrote:
xen/common/domain.c +3
-0@@ -1074,7 +1074,10 @@ int domain_soft_reset(struct domain *d)grant_table_warn_active_grants (d); for_each_vcpu ( d, v ) + { +memset (&runstate_guest (v),0 ,sizeof (runstate_guest (v)));unmap_vcpu_info (v); + }
Well, the idea seems okay, but using memset() looks bogus: Why can't you use guest_handle_from_pointer(NULL, ...) or set_xen_guest_handle(..., NULL)?
Jan