loader: More generic pre_exec for Linux (try 2)

André Hentschel nerv at dawncrow.de
Tue Jan 6 11:27:36 CST 2015


Am 06.01.2015 um 16:40 schrieb André Hentschel:
> Am 05.01.2015 um 21:37 schrieb Alexandre Julliard:
>> André Hentschel <nerv at dawncrow.de> writes:
>>
>>> Am 29.12.2014 um 23:03 schrieb André Hentschel:
>>>> ---
>>>>  loader/main.c | 26 ++++++++++++++++++--------
>>>>  1 file changed, 18 insertions(+), 8 deletions(-)
>>>
>>> [After a small IRC discussion]
>>>
>>> My main goal is to also get the 2G/2G vmsplit warning on ARM, too. (and potential other platforms)
>>> There are still many ARM kernels out there with a 2G split.
>>> The problem is that Wine can't start on 2G/2G, it seems there are too much assumptions in the code for a 3G split.
>>> e.g. for shared user data. We can't allocate 0x7ffe0000-0x7fff0000 on 2G split, most likely something else is already there, idk
>>
>> There are few such assumptions, and they could be fixed. The question is
>> whether there are actual apps that depend on these addresses, like there
>> are on i386. If not, it shouldn't be necessary to require a 3G split.
>>
> 
> Good point, i'll try every existing app i can.
> But it also would be helpful if Vincent could try to run !kuser in a win debugger on his tablet if possible:
> http://msdn.microsoft.com/en-us/library/windows/hardware/ff563942%28v=vs.85%29.aspx
> 

Already found an app: ProcessHacker 2.33
For the test i changed the kuserdata address in ntdll and kernel32 to 0x70000000

Vincent, as there are screenshots running the same binary on a RT tablet i would they the shared user data is handled the same
as on i386, thus no need for you to test it, sorry for the noise.

Here is the backtrace (asking for PF_SSE3_INSTRUCTIONS_AVAILABLE i think):

Unhandled exception: page fault on read access to 0x7ffe027e in 32-bit code (0x0040101c).
Register dump:
Thumb User Mode
 Pc:0040101c Sp:7619fd70 Lr:0040a8c7 Cpsr:60000030(-ZC-)
 r0:00000000 r1:004ae4c4 r2:00000000 r3:7ffe027e
 r4:76be8f6c r5:004d7c28 r6:00400000 r7:0000000a
 r8:0000000a r9:7ea40fe8 r10:76c53de8 Fp:7619fda0 Ip:76c38ff8
Stack dump:
0x7619fd70:  00000000 00000000 00000001 00000000
0x7619fd80:  00000000 00000000 00000000 00000000
0x7619fd90:  00000000 00000000 76be8f6c 004dbac0
0x7619fda0:  7619fdb8 0040a8c7 00000000 00000000
0x7619fdb0:  00000000 004d7be4 7619fdf8 004461eb
0x7619fdc0:  004a4ff9 004ab8d4 004ab8d4 00400000
Backtrace:
=>0 0x0040101c in processhacker (+0x101c) (0x7619fda0)
  1 0x0040a8c7 in processhacker (+0xa8c6) (0x7619fda0)
0x0040101c:
	ldrb	r3, [r3, #0]
Modules:
Module	Address			Debug info	Name (85 modules)
ELF	    8000-   11000	Deferred        <wine-loader>
PE	  400000-  51a000	Export          processhacker
ELF	7505e000-75069000	Deferred        libgpg-error.so.0
ELF	75069000-7509b000	Deferred        libdbus-1.so.3
ELF	7509b000-750ae000	Deferred        libp11-kit.so.0
ELF	750ae000-75116000	Deferred        libgcrypt.so.11
ELF	75116000-75129000	Deferred        libtasn1.so.3
ELF	75129000-75141000	Deferred        libresolv.so.2
ELF	75141000-7514c000	Deferred        libkeyutils.so.1
ELF	7514c000-7515a000	Deferred        libkrb5support.so.0
ELF	7515a000-75165000	Deferred        libcom_err.so.2
ELF	75165000-7518e000	Deferred        libk5crypto.so.3
ELF	7518e000-7521e000	Deferred        libkrb5.so.3
ELF	7521e000-75232000	Deferred        libavahi-client.so.3
ELF	75232000-75244000	Deferred        libavahi-common.so.3
ELF	75244000-752cd000	Deferred        libgnutls.so.26
ELF	752cd000-752f9000	Deferred        libgssapi_krb5.so.2
ELF	752f9000-7533b000	Deferred        libcups.so.2
ELF	7533b000-7536d000	Deferred        uxtheme<elf>
  \-PE	75340000-7536d000	\               uxtheme
ELF	7536d000-75379000	Deferred        libxfixes.so.3
ELF	75379000-75387000	Deferred        libxcursor.so.1
ELF	75387000-75398000	Deferred        libxi.so.6
ELF	75398000-753a2000	Deferred        libxcomposite.so.1
ELF	753a2000-753af000	Deferred        libxrandr.so.2
ELF	753af000-753bd000	Deferred        libxrender.so.1
ELF	753bd000-753c9000	Deferred        libxxf86vm.so.1
ELF	753c9000-753e4000	Deferred        libxcb.so.1
ELF	753e4000-754cd000	Deferred        libx11.so.6
ELF	754cd000-754df000	Deferred        libxext.so.6
ELF	754df000-7556d000	Deferred        winex11<elf>
  \-PE	754f0000-7556d000	\               winex11
ELF	7556d000-75595000	Deferred        imm32<elf>
  \-PE	75570000-75595000	\               imm32
ELF	75595000-755b6000	Deferred        libexpat.so.1
ELF	755b6000-755e2000	Deferred        libfontconfig.so.1
ELF	755e2000-755fb000	Deferred        libz.so.1
ELF	755fb000-75657000	Deferred        libfreetype.so.6
ELF	75657000-75678000	Deferred        libtinfo.so.5
ELF	75678000-75695000	Deferred        libncurses.so.5
ELF	75695000-75795000	Deferred        oleaut32<elf>
  \-PE	756b0000-75795000	\               oleaut32
ELF	75795000-757d8000	Deferred        winspool<elf>
  \-PE	757a0000-757d8000	\               winspool
ELF	757d8000-758c1000	Deferred        comdlg32<elf>
  \-PE	757e0000-758c1000	\               comdlg32
ELF	758c1000-7593e000	Deferred        rpcrt4<elf>
  \-PE	758d0000-7593e000	\               rpcrt4
ELF	7593e000-75a3a000	Deferred        ole32<elf>
  \-PE	75960000-75a3a000	\               ole32
ELF	75a3a000-75aac000	Deferred        shlwapi<elf>
  \-PE	75a50000-75aac000	\               shlwapi
ELF	75aac000-75cc1000	Deferred        shell32<elf>
  \-PE	75ac0000-75cc1000	\               shell32
ELF	75cc1000-75ce1000	Deferred        version<elf>
  \-PE	75cd0000-75ce1000	\               version
ELF	75ce1000-75d48000	Deferred        advapi32<elf>
  \-PE	75cf0000-75d48000	\               advapi32
ELF	75d48000-75e42000	Deferred        gdi32<elf>
  \-PE	75d60000-75e42000	\               gdi32
ELF	75e42000-75f78000	Deferred        user32<elf>
  \-PE	75e60000-75f78000	\               user32
ELF	75f78000-76062000	Deferred        comctl32<elf>
  \-PE	75f80000-76062000	\               comctl32
ELF	76062000-76080000	Deferred        winsta<elf>
  \-PE	76070000-76080000	\               winsta
ELF	76095000-760a0000	Deferred        libxdmcp.so.6
ELF	761a6000-761b0000	Deferred        libxau.so.6
ELF	761b2000-761bb000	Deferred        libxinerama.so.1
ELF	7633d000-76580000	Deferred        kernel32<elf>
  \-PE	76350000-76580000	\               kernel32
ELF	76699000-766aa000	Deferred        libnss_files.so.2
ELF	766aa000-766ba000	Deferred        libnss_nis.so.2
ELF	766ba000-766d2000	Deferred        libnsl.so.1
ELF	766d2000-766e0000	Deferred        libnss_compat.so.2
ELF	76aeb000-76b0f000	Deferred        libgcc_s.so.1
ELF	76b0f000-76b7a000	Deferred        libm.so.6
ELF	76b7a000-76b88000	Deferred        librt.so.1
ELF	76b88000-76c55000	Deferred        ntdll<elf>
  \-PE	76ba0000-76c55000	\               ntdll
ELF	76c55000-76c60000	Deferred        libdl.so.2
ELF	76c60000-76d3e000	Deferred        libc.so.6
ELF	76d3e000-76d59000	Deferred        libpthread.so.0
ELF	76d64000-76f0a000	Dwarf           libwine.so.1
ELF	76f0a000-76f29000	Deferred        ld-linux-armhf.so.3
Threads:
process  tid      prio (all id:s are in hex)
0000000e services.exe
	0000001f    0
	0000001e    0
	00000014    0
	00000010    0
	0000000f    0
00000012 winedevice.exe
	0000001d    0
	00000018    0
	00000017    0
	00000013    0
00000019 explorer.exe
	0000001a    0
0000001b plugplay.exe
	00000021    0
	00000020    0
	0000001c    0
00000022 Wabbitemu.exe
	00000025    0
	00000024    0
0000002a (D) Z:\home\dawncrow\ARM_Apps\xda-developers.com\ProcessHacker_2.30_arm_beta_rel3\ProcessHacker.exe
	0000002b    0 <==
System information:
    Wine build: wine-1.7.33-146-g102d893
    Platform: arm
    Host system: Linux
    Host version: 3.14.14-cubox





More information about the wine-devel mailing list