panic upon starting X in recent -CURRENTs (intel driver)
Michiel Boland
michiel at boland.org
Mon Feb 18 14:35:33 PST 2008
> Hi. After recent upgrade (from 21 dec to today's src) the kernel crashes when
> starting X with
>
> panic: pmap_remove_all: page 0xc56e07f8 is fictitious
FWIW below is a trivial program to re-create a similar crash. Needs root,
obviously. But still shouldn't cause a panic though. Note that the trick
in the program is that we mmap two pages, then munmap only half of them.
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
static const off_t map_address = 0xa0000;
static const size_t map_size = 0x1000;
static int testit(int fd)
{
void *p;
int rv;
p = mmap(NULL, 2 * map_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
map_address);
if (p == MAP_FAILED) {
perror("mmap");
return -1;
}
rv = *(char *) p;
if (munmap(p, map_size) == -1) {
perror("munmap");
return -1;
}
return rv;
}
int main(void)
{
int fd, rv;
fd = open("/dev/mem", O_RDWR);
if (fd == -1) {
perror("open");
return 1;
}
rv = testit(fd);
close(fd);
return rv;
}
More information about the freebsd-current
mailing list