Lawrence Gold napisaĆ(a): > On Nov 28, 2005, at 2:29 AM, Adam D. Moss wrote: > >> Julian is using a processor (implied by -march=prescott) which supports >> the NX bit. SELinux (or a kernel reconfig, or Linux 2.6.8+ by default) >> may very well be configured to enable no-execute on process data pages, >> which is a nice security move but would cause a fault as soon as a >> process jumps to dynamically generated code in a data/heap area, >> as I would guess dynarec cores and many other JITs do. >> >> I think that execute-protection can be lowered by mmapping the >> appropriate area with PROT_EXEC, or using mprotect, though I've >> never had the hardware to try. > > > Good idea. I'd forgotten about the NX bit. > > Julian: Look for HAVE_MPROTECT in the makefile. I don't think this has > ever been tested, so you'll be a guinea pig. :-) > > Thanks. > > > _______________________________________________ > Xmame mailing list > Xmame@toybox.twisted.org.uk > http://toybox.twisted.org.uk/mailman/listinfo/xmame >
I have enabled HAVE_MPROTECT, now the backtrace is different: (gdb) bt #0 0x08501f04 in drc_cache_reset (drc=0x0) at src/x86drc.c:114 #1 0x0835ac3e in ppcdrc603_reset (param=0xab12c60) at src/cpu/powerpc/ppcdrc.c:1135 #2 0x080ac3fd in cpunum_reset (cpunum=0, param=0xab12c60, irqack=0x80aa616 <cpu_0_irq_callback>) at src/cpuintrf.c:1460 #3 0x080a68c2 in cpu_pre_run () at src/cpuexec.c:410 #4 0x080a694b in cpu_run () at src/cpuexec.c:462 #5 0x080fb6b1 in run_machine_core () at src/mame.c:598 #6 0x080fb550 in run_machine () at src/mame.c:529 #7 0x080fb268 in run_game (game=2968) at src/mame.c:361 #8 0x09ed0aec in main (argc=2, argv=0xbfa6ec74) at src/unix/main.c:104 (gdb) The othe with HAVE_MPROTECT disabled: (gdb) bt #0 0x08502056 in drc_execute (drc=0xd47e908) at src/x86drc.c:156 #1 0x0835ac66 in ppcdrc603_execute (cycles=833333) at src/cpu/powerpc/ppcdrc.c:1155 #2 0x080ac343 in cpunum_execute (cpunum=0, cycles=833333) at src/cpuintrf.c:1444 #3 0x080a74b8 in cpu_timeslice () at src/cpuexec.c:1042 #4 0x080a6951 in cpu_run () at src/cpuexec.c:477 #5 0x080fb671 in run_machine_core () at src/mame.c:598 #6 0x080fb510 in run_machine () at src/mame.c:529 #7 0x080fb228 in run_game (game=2968) at src/mame.c:361 #8 0x09ed0a76 in main (argc=2, argv=0xbfe6ad84) at src/unix/main.c:104 (gdb) Maybe we're getting somewhere? Moreover, a selinux and kernel update have arrived. I'll check them as soon as livna releases updated kernel modules. Greets. _______________________________________________ Xmame mailing list Xmame@toybox.twisted.org.uk http://toybox.twisted.org.uk/mailman/listinfo/xmame