[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/hvm: Fix mapping corner case during task switching.



>>> On 28.08.18 at 20:17, <andrew.cooper3@xxxxxxxxxx> wrote:
> hvm_map_entry() can fail for a number of reasons, including for a misaligned
> LDT/GDT access which crosses a 4K boundary.  Architecturally speaking, this
> should be fixed, but Long Mode doesn't support task switches, and no 32bit OS
> is going to misalign its LDT/GDT base, which is why this task isn't very high
> on the TODO list.
> 
> However, the hvm_map_fail error label returns failure without raising an
> exception, which interferes with hvm_task_switch()'s exception tracking, and
> can cause it to finish and return to guest context as if the task switch had
> completed successfully.
> 
> Resolve this corner case by folding all the failure paths together, which
> causes an hvm_map_entry() failure to result in #TS[SEL].  hvm_unmap_entry()
> copes fine with a NULL pointer so can be called unconditionally.
> 
> In practice, this is just a latent corner case as all hvm_map_entry() failures
> crash the domain, but it should be fixed nevertheless.
> 
> Finally, rename hvm_load_segment_selector() to task_switch_load_seg() to avoid
> giving the impression that it is usable for general segment loading.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.