Re: [Qemu-devel] [PATCH] target-i386: fix segment limit check in ljmp

2018-08-20 Thread Paolo Bonzini
On 20/08/2018 13:32, Andrew Oates wrote: > We should just remove the part that > implies qemu should enforce it from my patch commit message. Ok, will do. Paolo

Re: [Qemu-devel] [PATCH] target-i386: fix segment limit check in ljmp

2018-08-20 Thread Andrew Oates
On Mon, Aug 20, 2018 at 6:06 AM Paolo Bonzini wrote: > > On 17/08/2018 20:04, Andrew Oates wrote: > >>> [1] this is an invalid configuration (in protected mode the L bit is > >>> reserved and should be set to zero), but qemu doesn't enforce that. > > > > Is there a central place to do that sort of

Re: [Qemu-devel] [PATCH] target-i386: fix segment limit check in ljmp

2018-08-20 Thread Paolo Bonzini
On 17/08/2018 20:04, Andrew Oates wrote: >>> [1] this is an invalid configuration (in protected mode the L bit is >>> reserved and should be set to zero), but qemu doesn't enforce that. > > Is there a central place to do that sort of validation?  We could do it > in load_segment_ra, but that doesn'

Re: [Qemu-devel] [PATCH] target-i386: fix segment limit check in ljmp

2018-08-17 Thread Andrew Oates
On Fri, Aug 17, 2018 at 1:38 PM Paolo Bonzini wrote: > On 16/08/2018 03:19, and...@andrewoates.com wrote: > > From: Andrew Oates > > > > The current implementation has three bugs, > > * segment limits are not enforced in protected mode if the L bit is set > >in the target segment descriptor

Re: [Qemu-devel] [PATCH] target-i386: fix segment limit check in ljmp

2018-08-17 Thread Paolo Bonzini
On 16/08/2018 03:19, and...@andrewoates.com wrote: > From: Andrew Oates > > The current implementation has three bugs, > * segment limits are not enforced in protected mode if the L bit is set >in the target segment descriptor[1] > * segment limits are not enforced in compatability mode (lj

[Qemu-devel] [PATCH] target-i386: fix segment limit check in ljmp

2018-08-15 Thread andrew
From: Andrew Oates The current implementation has three bugs, * segment limits are not enforced in protected mode if the L bit is set in the target segment descriptor[1] * segment limits are not enforced in compatability mode (ljmp to 32-bit code segment in long mode) * #GP(new_cs) is ge