From owner-freebsd-current@FreeBSD.ORG Mon Feb 18 22:35:33 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7560E16A41A for ; Mon, 18 Feb 2008 22:35:33 +0000 (UTC) (envelope-from michiel@boland.org) Received: from neerbosch.nijmegen.internl.net (neerbosch.nijmegen.internl.net [217.149.193.38]) by mx1.freebsd.org (Postfix) with ESMTP id 15C6613C461 for ; Mon, 18 Feb 2008 22:35:32 +0000 (UTC) (envelope-from michiel@boland.org) Received: from neerbosch.nijmegen.internl.net by neerbosch.nijmegen.internl.net via neerbosch.nijmegen.internl.net [217.149.193.38] with ESMTP for id m1IMZVXI002208 (8.13.4/1.4); Mon, 18 Feb 2008 23:35:31 +0100 (MET) Received: from localhost by neerbosch.nijmegen.internl.net via mboland@localhost with ESMTP for id m1IMZVOK002205 (8.13.4/2.02); Mon, 18 Feb 2008 23:35:31 +0100 (MET) X-Authentication-Warning: neerbosch.nijmegen.internl.net: mboland owned process doing -bs Date: Mon, 18 Feb 2008 23:35:31 +0100 (MET) From: Michiel Boland To: freebsd-current@freebsd.org In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: panic upon starting X in recent -CURRENTs (intel driver) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 22:35:33 -0000 > 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 #include #include #include #include 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; }