Re: [PATCH] x86emul: don't call ->read_segment() with x86_seg_none

2024-08-14 Thread Jan Beulich
On 14.08.2024 14:49, Andrew Cooper wrote: > On 12/08/2024 3:05 pm, Jan Beulich wrote: >> On 12.08.2024 15:04, Andrew Cooper wrote: >>> Also, looking at the emulator logic, we're missing the DPL vs >>> CPL/RPL/Conforming checks. >> There's surely nothing "conforming" for a nul selector. Hence perhap

Re: [PATCH] x86emul: don't call ->read_segment() with x86_seg_none

2024-08-14 Thread Andrew Cooper
On 14/08/2024 2:10 pm, Jan Beulich wrote: > On 14.08.2024 14:49, Andrew Cooper wrote: >> On 12/08/2024 3:05 pm, Jan Beulich wrote: >>> On 12.08.2024 15:04, Andrew Cooper wrote: On 05/08/2024 2:26 pm, Jan Beulich wrote: > --- a/xen/arch/x86/x86_emulate/x86_emulate.c > +++ b/xen/arch/x86

Re: [PATCH] x86emul: don't call ->read_segment() with x86_seg_none

2024-08-14 Thread Jan Beulich
On 14.08.2024 14:49, Andrew Cooper wrote: > On 12/08/2024 3:05 pm, Jan Beulich wrote: >> On 12.08.2024 15:04, Andrew Cooper wrote: >>> On 05/08/2024 2:26 pm, Jan Beulich wrote: --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -839,7 +839,8

Re: [PATCH] x86emul: don't call ->read_segment() with x86_seg_none

2024-08-14 Thread Andrew Cooper
On 12/08/2024 3:05 pm, Jan Beulich wrote: > On 12.08.2024 15:04, Andrew Cooper wrote: >> On 05/08/2024 2:26 pm, Jan Beulich wrote: >>> --- a/xen/arch/x86/x86_emulate/x86_emulate.c >>> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c >>> @@ -839,7 +839,8 @@ protmode_load_seg( >>> case x86_seg_t

Re: [PATCH] x86emul: don't call ->read_segment() with x86_seg_none

2024-08-12 Thread Jan Beulich
On 12.08.2024 15:04, Andrew Cooper wrote: > On 05/08/2024 2:26 pm, Jan Beulich wrote: >> --- a/xen/arch/x86/x86_emulate/x86_emulate.c >> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c >> @@ -839,7 +839,8 @@ protmode_load_seg( >> case x86_seg_tr: >> goto raise_exn; >> }

Re: [PATCH] x86emul: don't call ->read_segment() with x86_seg_none

2024-08-12 Thread Andrew Cooper
On 05/08/2024 2:26 pm, Jan Beulich wrote: > LAR, LSL, VERR, and VERW emulation involve calling protmode_load_seg() > with x86_seg_none. The fuzzer's read_segment() hook function has an > assertion which triggers in this case. Calling the hook function, > however, makes little sense for those insns,

Re: [PATCH] x86emul: don't call ->read_segment() with x86_seg_none

2024-08-09 Thread Stefano Stabellini
On Wed, 7 Aug 2024, Jan Beulich wrote: > On 06.08.2024 20:24, Stefano Stabellini wrote: > > On Mon, 5 Aug 2024, Jan Beulich wrote: > >> LAR, LSL, VERR, and VERW emulation involve calling protmode_load_seg() > >> with x86_seg_none. The fuzzer's read_segment() hook function has an > >> assertion whic

Re: [PATCH] x86emul: don't call ->read_segment() with x86_seg_none

2024-08-07 Thread Jan Beulich
On 06.08.2024 20:24, Stefano Stabellini wrote: > On Mon, 5 Aug 2024, Jan Beulich wrote: >> LAR, LSL, VERR, and VERW emulation involve calling protmode_load_seg() >> with x86_seg_none. The fuzzer's read_segment() hook function has an >> assertion which triggers in this case. Calling the hook functio

Re: [PATCH] x86emul: don't call ->read_segment() with x86_seg_none

2024-08-06 Thread Stefano Stabellini
On Mon, 5 Aug 2024, Jan Beulich wrote: > LAR, LSL, VERR, and VERW emulation involve calling protmode_load_seg() > with x86_seg_none. The fuzzer's read_segment() hook function has an > assertion which triggers in this case. Calling the hook function, > however, makes little sense for those insns, as

[PATCH] x86emul: don't call ->read_segment() with x86_seg_none

2024-08-05 Thread Jan Beulich
LAR, LSL, VERR, and VERW emulation involve calling protmode_load_seg() with x86_seg_none. The fuzzer's read_segment() hook function has an assertion which triggers in this case. Calling the hook function, however, makes little sense for those insns, as there's no data to retrieve. Instead zero-fill