Re: [PATCH v2 1/2] x86_64,entry: Filter RFLAGS.NT on entry from userspace

2014-09-30 Thread Sebastian Lackner
> + testl $X86_EFLAGS_NT,EFLAGS(%rsp) /* saved EFLAGS match cpu */ > + jz 1f > + pushq_cfi $(X86_EFLAGS_IF|X86_EFLAGS_FIXED) > + popfq_cfi > +1: > + Do you think it makes sense to change the order here, so that no jump happens if NT is not set (which happens a bit more often,

Re: [PATCH 1/2] x86_64,entry: Filter RFLAGS.NT on entry from userspace

2014-09-30 Thread Sebastian Lackner
On 30.09.2014 23:45, Andy Lutomirski wrote: > On Tue, Sep 30, 2014 at 2:39 PM, Sebastian Lackner > wrote: >> On 30.09.2014 21:40, Andy Lutomirski wrote: >>> what would happen. Apparently Wine sometimes does this (!), and, if >>> an IRET return happens, Wine will

Re: [PATCH 1/2] x86_64,entry: Filter RFLAGS.NT on entry from userspace

2014-09-30 Thread Sebastian Lackner
On 30.09.2014 21:40, Andy Lutomirski wrote: > what would happen. Apparently Wine sometimes does this (!), and, if > an IRET return happens, Wine will segfault. > > I think that Wine should be fixed to stop setting NT when a syscall > happens, but handling NT more gracefully is still nice. > Jus

Re: [PATCH] x86 : Ensure X86_FLAGS_NT is cleared on syscall entry

2014-09-29 Thread Sebastian Lackner
On 29.09.2014 21:33, Thomas Gleixner wrote: > On Mon, 29 Sep 2014, Sebastian Lackner wrote: >> On 29.09.2014 19:40, Andy Lutomirski wrote: >> Well, the best documentation I've found is something like >> http://www.fermimn.gov.it/linux/quarta/x86/int.htm >>

Re: [PATCH] x86 : Ensure X86_FLAGS_NT is cleared on syscall entry

2014-09-29 Thread Sebastian Lackner
Without this fix the application segmentation >> faults on syscall return because of the changed meaning of the IRET >> instruction. >> >> Further details can be seen here >> https://bugs.winehq.org/show_bug.cgi?id=33275 >> >> Signed-off-by: Anish Bhatt >