Re: panic upon starting X in recent -CURRENTs (intel driver)

From: Michiel Boland <michiel_at_boland.org>
Date: Mon, 18 Feb 2008 23:35:31 +0100 (MET)
> 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;
}
Received on Mon Feb 18 2008 - 21:35:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:27 UTC