Port-xen archive

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

NX bit and a.out



It looks like the recent patches to enable the NX bit on Xen ports has
broken a.out binaries.

I confirmed that forcing PG_NX to 0 in sys/arch/i386/include/pte.h allows
a.out programs to work.

Here is a ktrace from a small program.

  1028      0 ktrace   EMUL  "netbsd"
  1028      0 ktrace   RET   ktrace 0
  1028      0 ktrace   CALL  execve(0xbf7fe928,0xbf7fee00,0xbf7fee08)
  1028      0 ktrace   NAMI  "/usr/local/sbin/mpage.old"
  1028      0 ktrace   RET   execve -1 errno 2 No such file or directory
  1028      0 ktrace   CALL  execve(0xbf7fe928,0xbf7fee00,0xbf7fee08)
  1028      0 ktrace   NAMI  "/usr/local/bin/mpage.old"
  1028      0 mpage.old EMUL  "netbsd"
  1028      0 mpage.old RET   syscall JUSTRETURN
  1028      0 mpage.old CALL  open(0x10ab,0,0)
  1028      0 mpage.old NAMI  "/usr/libexec/ld.so"
  1028      0 mpage.old RET   open 3
  1028      0 mpage.old CALL  read(3,0xbf7ffe44,0x20)
  1028      0 mpage.old GIO   fd 3 read 32 bytes
    "\M-@\M^F\^A\v\0\M-P\0\0\0\^P\0\0\M-P\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0"
  1028      0 mpage.old RET   read 32/0x20
  1028      0 mpage.old CALL  mmap(0,0xe0d0,5,4,3,0,0,0)
  1028      0 mpage.old RET   mmap -1149304832/0xbb7f0000
  1028      0 mpage.old CALL  mmap(0xbb7fd000,0x1000,3,0x14,3,0,0xd000,0)
  1028      0 mpage.old RET   mmap -1149251584/0xbb7fd000
  1028      0 mpage.old CALL  mmap(0xbb7fe000,0xd0,3,0x1014,0xffffffff,0,0,0)
  1028      0 mpage.old RET   mmap -1149247488/0xbb7fe000
  1028      0 mpage.old PSIG  SIGSEGV SIG_DFL: code=SEGV_ACCERR, 
addr=0xbb7fd0e8, trap=6)
  1028      0 mpage.old NAMI  "mpage.old.core"

Thanks.

--
- Brian


Home | Main Index | Thread Index | Old Index