NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Wine11 and PaX MPROTECT



Hi guys,
I spent some time trying to port Wine 11 (recent one) to NetBSD (I'm
on 11.0 atm).
It was mostly just migration of patches from existing emulators/wine.
It works fine and I was able to run some windows CLI programs and just
have run TotalCommander (gui file manager).

My current problem is that any time I call wine <program> I get
segfault due to MPROTECT. The wine binary has paxctl +m set which as
far as I understand should disable the protection. Unfortunately it
still crashes. It works fine though, if I disable mprotect completely
with sysctl -w security.pax.mprotect.global=0.

Could you please help me debug this? I'm not sure what to do and how
is it possible that the binary segfaults due to mprotect call even
though mprotect is disabled on it.
I traced it with ktruss and it clearly fails on one of the mprotect calls:
11842  11842 wine     mprotect(0x10002a000, 0x6000, 0x3) Err#13 EACCES

Please note my knowledge of pax mprotect is limited to security(7) and
mprotect(2). I went ahead and did paxctl +m on every wine related
binary and *.so file but it didn't change anything. My assumption was
that wine somehow forks another process that doesn't inherit the fact
that mprotect is disabled. I also don't fully understand how it is
possible that mprotect is a call inside of wine program and it's not
something that kernel does under the hood (just giving you additional
context of my understanding of it all).

Please help.

Thanks,
Ruslan

P.S.
I've submitted this question to pkgsrc-users and was advised to post
here if there is no reply from pkgsrc people for a few days. Will be
happy for any input.


Home | Main Index | Thread Index | Old Index