Subject: Re: Unable to mmap /dev/mem
To: Matthieu Herrb <matthieu@laas.fr>
From: Jared D. McNeill <jmcneill@invisible.yi.org>
List: tech-x11
Date: 11/13/2000 11:52:27
On Mon, 13 Nov 2000, Matthieu Herrb wrote:
> You should try to use ktrace on the applications in question, if you
> haven't already done it.
Here are the last 40 lines of the ktrace when run as root. Hope this is
helpful...
Jared
\0\0\0\0\0\^A\0\^A\0\0\0\0\0\0\0\0\0\M-t\M-T4\b\0\0\0\0\0\0\0\0"
4054 snes9x RET read 32/0x20
4054 snes9x CALL open(0x80e89de,0x2,0x8e1f800)
4054 snes9x NAMI "/dev/mem"
4054 snes9x RET open 5
4054 snes9x CALL close(0)
4054 snes9x RET close 0
4054 snes9x CALL write(0x4,0x8e93000,0x8)
4054 snes9x GIO fd 4 wrote 8 bytes
"\M^Q\^A\^B\0\0\0@\^B"
4054 snes9x RET write 8
4054 snes9x CALL read(0x4,0xbfbfca04,0x20)
4054 snes9x GIO fd 4 read 32 bytes
"\^A\M-E\v\0\0\0\0\0\0\0\0\M-M\0\^D\0\0\0\0\M^@\0\0 \0\0\0\0\0\0\0\0\0\
\0"
4054 snes9x RET read 32/0x20
4054 snes9x CALL open(0x80e8abc,0x2,0x8e1f800)
4054 snes9x NAMI "/dev/mem"
4054 snes9x RET open 0
4054 snes9x CALL mmap(0,0x800000,0x1,0x1,0,0,0xcd000000,0xffffffff)
4054 snes9x RET mmap -1 errno 22 Invalid argument
4054 snes9x CALL issetugid
4054 snes9x RET issetugid 0
4054 snes9x CALL open(0xbfbfc5fc,0,0x4824e2dc)
4054 snes9x NAMI "/usr/share/nls/C/libc.cat"
4054 snes9x RET open 6
4054 snes9x CALL __fstat13(0x6,0xbfbfc570)
4054 snes9x RET __fstat13 0
4054 snes9x CALL mmap(0,0xf57,0x1,0x1,0x6,0,0,0)
4054 snes9x RET mmap 1210429440/0x4825b000
4054 snes9x CALL close(0x6)
4054 snes9x RET close 0
4054 snes9x CALL munmap(0x4825b000,0xf57)
4054 snes9x RET munmap 0
4054 snes9x CALL write(0x2,0xbfbfc37c,0x3c)
4054 snes9x GIO fd 2 wrote 60 bytes
"XF86DGAGetVideo: failed to mmap /dev/mem (Invalid argument)
"
4054 snes9x RET write 60/0x3c
4054 snes9x CALL exit(0xfffffffe)