I had a program that did an
mmap(ADDR1, 4M, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, /dev/mem, 0)
and the Oops occurred after scribbling over the first 8k or so
pointed to at ADDR1. This was with kernels 1.2.13 and 1.3.57.
I would have thought that MAP_PRIVATE would not have affected
any other processes, but everything died. (I suspect I had overwritten
the interrupt vector table..?)
What I was trying to do was to access some memory mapped
hardware (which I don't have yet) at a physical address of
0x00c00000. Changing the final 0 parameter to the mmap call
to 0x00c00000 seemed a lot better (it read back as all 0xff),
but attempting to write to it gave a 'bogus page' fault and
the program died. How can I persuade the kernel to map me some
address space which it doesn't know about (ie isn't RAM) ?
The manual page I have talks about Linux 0.99.11 - is there
a newer one ?!
-- Peter Fox