Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-03 Thread Jan Beulich
>>> On 03.05.17 at 14:00, wrote: > On 03/05/17 11:44, Razvan Cojocaru wrote: >> On 05/03/17 12:30, Jan Beulich wrote: >> On 03.05.17 at 11:21, wrote: At 10:15 +0100 on 03 May (1493806508), Tim Deegan wrote: > At 00:31 -0600 on 03 May (1493771502), Jan Beulich wrote: >> +else

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-03 Thread Andrew Cooper
On 03/05/17 11:44, Razvan Cojocaru wrote: > On 05/03/17 12:30, Jan Beulich wrote: > On 03.05.17 at 11:21, wrote: >>> At 10:15 +0100 on 03 May (1493806508), Tim Deegan wrote: At 00:31 -0600 on 03 May (1493771502), Jan Beulich wrote: > +else if ( ctxt.cur > sizeof(*desc) ) >

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-03 Thread Razvan Cojocaru
On 05/03/17 12:30, Jan Beulich wrote: On 03.05.17 at 11:21, wrote: >> At 10:15 +0100 on 03 May (1493806508), Tim Deegan wrote: >>> At 00:31 -0600 on 03 May (1493771502), Jan Beulich wrote: +else if ( ctxt.cur > sizeof(*desc) ) { uint32_t off; -con

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-03 Thread Julien Grall
Hi Jan, On 02/05/17 16:43, Jan Beulich wrote: On 02.05.17 at 17:21, wrote: hvm_save_cpu_ctxt() returns success without writing any data into hvm_domain_context_t when all VCPUs are offline. This can then crash the hypervisor (with FATAL PAGE FAULT) in hvm_save_one() via the "off < (ctxt.cur -

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-03 Thread Jan Beulich
>>> On 03.05.17 at 11:21, wrote: > At 10:15 +0100 on 03 May (1493806508), Tim Deegan wrote: >> At 00:31 -0600 on 03 May (1493771502), Jan Beulich wrote: >> > +else if ( ctxt.cur > sizeof(*desc) ) >> > { >> > uint32_t off; >> > -const struct hvm_save_descriptor *desc; >> >

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-03 Thread Tim Deegan
At 10:15 +0100 on 03 May (1493806508), Tim Deegan wrote: > At 00:31 -0600 on 03 May (1493771502), Jan Beulich wrote: > > +else if ( ctxt.cur > sizeof(*desc) ) > > { > > uint32_t off; > > -const struct hvm_save_descriptor *desc; > > > > -rv = -ENOENT; > >

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-03 Thread Razvan Cojocaru
On 05/03/17 12:15, Tim Deegan wrote: > At 00:31 -0600 on 03 May (1493771502), Jan Beulich wrote: >> Hmm, with both of you being of that opinion, I've taken another >> look. I think I see now why you think that way (this being data >> from an internal producer, overflow/underflow are not a primary >

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-03 Thread Tim Deegan
At 00:31 -0600 on 03 May (1493771502), Jan Beulich wrote: > Hmm, with both of you being of that opinion, I've taken another > look. I think I see now why you think that way (this being data > from an internal producer, overflow/underflow are not a primary > concern), so I'll withdraw my objection t

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Jan Beulich
>>> On 02.05.17 at 18:11, wrote: > On 02/05/17 17:02, Tim Deegan wrote: >> At 18:21 +0300 on 02 May (1493749307), Razvan Cojocaru wrote: >>> hvm_save_cpu_ctxt() returns success without writing any data into >>> hvm_domain_context_t when all VCPUs are offline. This can then crash >>> the hypervisor

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Razvan Cojocaru
On 05/02/2017 07:11 PM, Andrew Cooper wrote: > On 02/05/17 17:02, Tim Deegan wrote: >> At 18:21 +0300 on 02 May (1493749307), Razvan Cojocaru wrote: >>> hvm_save_cpu_ctxt() returns success without writing any data into >>> hvm_domain_context_t when all VCPUs are offline. This can then crash >>> the

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Andrew Cooper
On 02/05/17 17:02, Tim Deegan wrote: > At 18:21 +0300 on 02 May (1493749307), Razvan Cojocaru wrote: >> hvm_save_cpu_ctxt() returns success without writing any data into >> hvm_domain_context_t when all VCPUs are offline. This can then crash >> the hypervisor (with FATAL PAGE FAULT) in hvm_save_one

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Razvan Cojocaru
On 05/02/2017 06:41 PM, Jan Beulich wrote: On 02.05.17 at 17:21, wrote: >> hvm_save_cpu_ctxt() returns success without writing any data into >> hvm_domain_context_t when all VCPUs are offline. This can then crash >> the hypervisor (with FATAL PAGE FAULT) in hvm_save_one() via the >> "off < (c

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Tim Deegan
At 18:21 +0300 on 02 May (1493749307), Razvan Cojocaru wrote: > hvm_save_cpu_ctxt() returns success without writing any data into > hvm_domain_context_t when all VCPUs are offline. This can then crash > the hypervisor (with FATAL PAGE FAULT) in hvm_save_one() via the > "off < (ctxt.cur - sizeof(*de

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Jan Beulich
>>> On 02.05.17 at 17:21, wrote: > hvm_save_cpu_ctxt() returns success without writing any data into > hvm_domain_context_t when all VCPUs are offline. This can then crash > the hypervisor (with FATAL PAGE FAULT) in hvm_save_one() via the > "off < (ctxt.cur - sizeof(*desc))" for() test, where ctxt

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Jan Beulich
>>> On 02.05.17 at 17:21, wrote: > hvm_save_cpu_ctxt() returns success without writing any data into > hvm_domain_context_t when all VCPUs are offline. This can then crash > the hypervisor (with FATAL PAGE FAULT) in hvm_save_one() via the > "off < (ctxt.cur - sizeof(*desc))" for() test, where ctxt

[Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Razvan Cojocaru
hvm_save_cpu_ctxt() returns success without writing any data into hvm_domain_context_t when all VCPUs are offline. This can then crash the hypervisor (with FATAL PAGE FAULT) in hvm_save_one() via the "off < (ctxt.cur - sizeof(*desc))" for() test, where ctxt.cur remains 0, causing an underflow which