Hi,

Just a heads up that WINE seems to suffer from breakage if executed as a 32bit 
binary on an x86-64 kernel as of 2.6.17-rc, because (according to Andi Kleen) 
i386 NX is now enabled by default, and on x86-64 i386 behaves like a PAE 
enabled i386 kernel when performing IA32 emulation.

I've attached the entire thread for reference, as unfortunately I do not have 
the time to debug this problem, but thought that probably one of you would 
like to know.

Thread is also available to read here:

http://lkml.org/lkml/2006/4/21/99

Andi suspects that WINE is not making one of its mappings PROT_EXEC which 
causes a fault with NX enabled.

-- 
Cheers,
Alistair.

Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.
--- Begin Message ---
On Wednesday 19 April 2006 04:27, Linus Torvalds wrote:
> Instead of the normal one-week release schedule, there was now two weeks
> between 2.6.17-rc1 and -rc2, partly because I was travelling for one of
> those weeks, but partly because it was really quiet for a while. Likely a
> lot of people are concentrating on 2.6.16 and vendor releases.
>
> It picked up a bit in the last few days (it's also possible that the US
> people were all just stressed out over tax season ;), and I cut a
> 2.6.17-rc2. I expect to be back to the weekly schedule now, even if it is
> quiet (which I hope it will be).
>
> Not a lot of hugely interesting stuff, with a large portion of the diff
> being a late MIPS update (tssk tssk), and the huge diff from the
> long over-due removal of the Sangoma wan drivers that have been marked
> BROKEN for a long time. Same goes for the qlogicfc driver (which has been
> supplanted by the qla2xxx driver).
>
> As a result, the diff has just tons of deletions, even if most of the rest
> of the changes aren't all that big. But there are netfilter fixes, some
> more splice work, and just tons of random stuff: usb, scsi, knfsd, fuse,
> infiniband..

Something in here (or -rc1, I didn't test that) broke WINE. x86-64 kernel, 
32bit WINE, works fine on 2.6.16.7. I'll check whether -rc1 had the same 
problem and work backwards, but just in case somebody has an idea..

[alistair] 11:17 [~/.wine/drive_c/Program Files/Warcraft III] wine 
war3.exe -opengl
wine: Unhandled page fault on write access to 0x00495000 at address 0x495000 
(thread 0009), starting debugger...
WineDbg starting on pid 0x8
Unhandled exception: page fault on write access to 0x00495000 in 32-bit code 
(0x00495000).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:006b GS:0063
 EIP:00495000 ESP:7f9eff0c EBP:7f9effe8 EFLAGS:00010246(   - 00      -RIZP1)
 EAX:00000000 EBX:7fcb4710 ECX:00400000 EDX:00000000
 ESI:7ffdf3a0 EDI:00495000
Stack dump:
0x7f9eff0c:  7fc794de 7ffdf3a0 00000000 00000000
0x7f9eff1c:  00000000 ffffffff 7fc35ff8 7fc4caf0
0x7f9eff2c:  7fcb4710 00400000 7fcaf784 7f9effe8
0x7f9eff3c:  16d2f22f 168b9967 00000001 00000000
0x7f9eff4c:  00000000 00000000 00000000 00000000
0x7f9eff5c:  00000000 00000000 00000000 00000000
Backtrace:
=>1 0x00495000 EntryPoint in war3 (0x00495000)
  2 0xf7f763ab wine_switch_to_stack+0x17 in libwine.so.1 (0xf7f763ab)
0x00495000 EntryPoint in war3: pushl    %eax

-- 
Cheers,
Alistair.

Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


--- End Message ---
--- Begin Message ---

On Fri, 21 Apr 2006, Alistair John Strachan wrote:
> 
> Something in here (or -rc1, I didn't test that) broke WINE. x86-64 kernel, 
> 32bit WINE, works fine on 2.6.16.7. I'll check whether -rc1 had the same 
> problem and work backwards, but just in case somebody has an idea..

Nothing strikes me, but maybe Andi has a clue.

> [alistair] 11:17 [~/.wine/drive_c/Program Files/Warcraft III] wine 
> war3.exe -opengl
> wine: Unhandled page fault on write access to 0x00495000 at address 0x495000 
...


> Unhandled exception: page fault on write access to 0x00495000 in 32-bit code 

That looks bogus. %eip is 0x00495000, and might well have taken a fault, 
but it sure ain't a write access. According to the built-in wine debugger 
it was

> 0x00495000 EntryPoint in war3: pushl    %eax

which does do a write, but to %esp (which is 7f9eff0c according to the 
dump, and which is unlikely to have taken a fault, since it's almost 256 
bytes off the end of a page in the stack area).

Alistair, if you can do a "git bisect" on this one, that would help. 
Unless Andi goes "Duh!".

                Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


--- End Message ---
--- Begin Message ---
On Fri, 21 Apr 2006 09:40:26 -0700 (PDT) Linus Torvalds <[EMAIL PROTECTED]> 
wrote:
>
> On Fri, 21 Apr 2006, Alistair John Strachan wrote:
> > 
> > Something in here (or -rc1, I didn't test that) broke WINE. x86-64 kernel, 
> > 32bit WINE, works fine on 2.6.16.7. I'll check whether -rc1 had the same 
> > problem and work backwards, but just in case somebody has an idea..
> 
> Nothing strikes me, but maybe Andi has a clue.

Also (and this is probably already known) using a 2G/2G split on i386
kills wine.  At least when attempting to run Lotus Notes under wine, wine
gets a signal 9.  The normal 3G/1G split works fine.

-- 
Cheers,
Stephen Rothwell                    [EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


--- End Message ---
--- Begin Message ---
On Friday 21 April 2006 23:02, Andi Kleen wrote:
> On Friday 21 April 2006 18:40, Linus Torvalds wrote:
> > On Fri, 21 Apr 2006, Alistair John Strachan wrote:
> > > Something in here (or -rc1, I didn't test that) broke WINE. x86-64
> > > kernel, 32bit WINE, works fine on 2.6.16.7. I'll check whether -rc1 had
> > > the same problem and work backwards, but just in case somebody has an
> > > idea..
> >
> > Nothing strikes me, but maybe Andi has a clue.
>
> NX for 32bit programs is enabled by default now. Does it
> work with noexec32=off?
>
> If it's that then it won't work with PAE kernels on i386 and NX
> capable machines neither - i just changed the default to be
> the same as 32bit, but unlike 32bit all x86-64 kernels use PAE
> and many of the systems have NX.
>
> If it's not that  don't know what it could be. I actually even used a
> simple wine program with a post rc2 kernel and it worked for me.
>
> So it isn't anything fundamental. Maybe some bad interaction
> with copy protection again, but I don't remember changing ptrace
> at all this time.
>
> > Alistair, if you can do a "git bisect" on this one, that would help.
>
> If noexec32=off doesn't help please do.
> If noexec32 helps then it's likely a wine bug for using the wrong
> protections.

[alistair] 01:52 [~] uname -rm
2.6.17-rc2 x86_64

[alistair] 01:52 [~] cat /proc/cmdline
vga=794 root=/dev/sda1 quiet noexec32=off

[alistair] 01:51 [~/.wine/drive_c/Program Files/Warcraft III] wine 
war3.exe -opengl
err:ole:CoCreateInstance apartment not initialised
fixme:advapi:SetSecurityInfo stub

Aaand wine suddenly starts working again. Looks like a bug in WINE; is there 
any additional information required before I can file a bug report on this 
one? Thanks.

-- 
Cheers,
Alistair.

Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


--- End Message ---
--- Begin Message ---
On Saturday 22 April 2006 02:53, Alistair John Strachan wrote:

> > > Alistair, if you can do a "git bisect" on this one, that would help.
> >
> > If noexec32=off doesn't help please do.
> > If noexec32 helps then it's likely a wine bug for using the wrong
> > protections.
> 
> [alistair] 01:52 [~] uname -rm
> 2.6.17-rc2 x86_64
> 
> [alistair] 01:52 [~] cat /proc/cmdline
> vga=794 root=/dev/sda1 quiet noexec32=off
> 
> [alistair] 01:51 [~/.wine/drive_c/Program Files/Warcraft III] wine 
> war3.exe -opengl
> err:ole:CoCreateInstance apartment not initialised
> fixme:advapi:SetSecurityInfo stub
> 
> Aaand wine suddenly starts working again.

Ok. There is a way to change this at runtime for individual 
processes too (using personality), but most distros seem 
to miss the user tools for that so far.

> Looks like a bug in WINE; is there  
> any additional information required before I can file a bug report on this 
> one? Thanks.

They probably forget to set PROT_EXEC in either mprotect or mmap somewhere.
You can check in /proc/*/maps which mapping contains the address it is faulting
on and then try to find where it is allocated or mprotect'ed.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


--- End Message ---
--- Begin Message ---
On Friday 21 April 2006 18:40, Linus Torvalds wrote:
> On Fri, 21 Apr 2006, Alistair John Strachan wrote:
> > Something in here (or -rc1, I didn't test that) broke WINE. x86-64
> > kernel, 32bit WINE, works fine on 2.6.16.7. I'll check whether -rc1 had
> > the same problem and work backwards, but just in case somebody has an
> > idea..
>
> Nothing strikes me, but maybe Andi has a clue.

NX for 32bit programs is enabled by default now. Does it 
work with noexec32=off?

If it's that then it won't work with PAE kernels on i386 and NX
capable machines neither - i just changed the default to be
the same as 32bit, but unlike 32bit all x86-64 kernels use PAE
and many of the systems have NX.

If it's not that  don't know what it could be. I actually even used a simple 
wine program with a post rc2 kernel and it worked for me.

So it isn't anything fundamental. Maybe some bad interaction
with copy protection again, but I don't remember changing ptrace
at all this time.

> Alistair, if you can do a "git bisect" on this one, that would help.

If noexec32=off doesn't help please do.
If noexec32 helps then it's likely a wine bug for using the wrong
protections.

-Andi
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


--- End Message ---


Reply via email to