Re: [Xen-devel] [PATCH 2/6] x86/shadow: Fixes to hvm_emulate_insn_fetch()

2017-06-22 Thread Tim Deegan
Hi, At 16:12 +0100 on 21 Jun (1498061548), Andrew Cooper wrote: > Zero-legnth reads are jump-target segmentation checks; never serve them from > the cache. Why not? If the target is in the cached range, then it has passed the segmentation check. (Or if that's not true then the normal fetch

Re: [Xen-devel] [PATCH 2/6] x86/shadow: Fixes to hvm_emulate_insn_fetch()

2017-06-22 Thread Jan Beulich
>>> On 21.06.17 at 17:12, wrote: > --- a/xen/arch/x86/mm/shadow/common.c > +++ b/xen/arch/x86/mm/shadow/common.c > @@ -235,12 +235,16 @@ hvm_emulate_insn_fetch(enum x86_segment seg, > { > struct sh_emulate_ctxt *sh_ctxt = > container_of(ctxt, struct

[Xen-devel] [PATCH 2/6] x86/shadow: Fixes to hvm_emulate_insn_fetch()

2017-06-21 Thread Andrew Cooper
Zero-legnth reads are jump-target segmentation checks; never serve them from the cache. Force insn_off to a single byte, as offset can wrap around or truncate with respect to sh_ctxt->insn_buf_eip under a number of normal circumstances. Signed-off-by: Andrew Cooper