>>> On 02.11.16 at 15:52, <andrew.coop...@citrix.com> wrote:
> No sane OS would deliberately try this, but make Xen's emulation match real
> hardware by delivering #GP(0), rather than suffering a VMEntry failure.
> 
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>

Reviewed-by: Jan Beulich <jbeul...@suse.com>
albeit ...

> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
> @@ -4443,6 +4443,8 @@ x86_emulate(
>                   (rc = read_ulong(ea.mem.seg, ea.mem.off+2,
>                                    &base, mode_64bit() ? 8 : 4, ctxt, ops)) )
>                  goto done;
> +            generate_exception_if(mode_64bit() &&
> +                                  !is_canonical_address(base), EXC_GP, 0);

... I don't think the mode_64bit() part is needed.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to