linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.10-mm2: panic when munmap()ping the stack
Date: Mon, 10 Jan 2005 19:26:55 -0800	[thread overview]
Message-ID: <20050111032655.GF2696@holomorphy.com> (raw)
In-Reply-To: <1105401719.4153.2.camel@localhost>

On Mon, Jan 10, 2005 at 04:01:58PM -0800, Jeremy Fitzhardinge wrote:
> This program causes an instant panic for me:
>         #include <sys/mman.h>
>         int main(int argc, char **argv)
>         {
>         	munmap((char *)(((unsigned long)&argc) & ~4095), 4096*2);
>         
>         	return 0;
>         }
> I'm not sure if setting the signal handler is necessary or not.  My
> environment is largeish, so the stack is 2 pages; you might need to
> adjust it.
> There's a message on the console saying something like "panic: bad pgd:
> 0x00000e13".  It was a bit too quick to see.
> Plain 2.6.10 segfaults as expected; I haven't tried -mm1 to see what it
> does.
> Config attached.

$ grep -nr pgd_ERROR .
./arch/i386/kernel/vm86.c:151:          pgd_ERROR(*pgd);
./arch/arm/mm/fault-armv.c:67:  pgd_ERROR(*pgd);
./arch/sh/mm/init.c:94:         pgd_ERROR(*pgd);
./arch/m68k/atari/stram.c:679:          pgd_ERROR(*dir);
./arch/ppc64/mm/init.c:327:             pgd_ERROR(*dir);
./arch/parisc/kernel/pci-dma.c:206:             pgd_ERROR(*dir);
./arch/parisc/mm/kmap.c:116:            pgd_ERROR(*dir);
./mm/swapfile.c:530:            pgd_ERROR(*pgd);
./mm/msync.c:106:               pgd_ERROR(*pgd);
./mm/memory.c:162:              pgd_ERROR(*pgd);
./mm/memory.c:446:                      pgd_ERROR(*src_pgd);
./mm/memory.c:580:              pgd_ERROR(*pgd);
./mm/vmalloc.c:95:              pgd_ERROR(*pgd);
./mm/mprotect.c:100:            pgd_ERROR(*pgd);
(includes etc.)

Anyway, it's blatant pagetable corruption. Does binary searching -mm2
reveal anything?


-- wli

  parent reply	other threads:[~2005-01-11  3:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-11  0:01 2.6.10-mm2: panic when munmap()ping the stack Jeremy Fitzhardinge
2005-01-11  2:34 ` Jeremy Fitzhardinge
2005-01-11  3:26 ` William Lee Irwin III [this message]
2005-01-11  3:57 ` Andrew Morton
2005-01-11  5:19 ` Andi Kleen
2005-01-11 23:04 ` Frank Denis (Jedi/Sector One)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050111032655.GF2696@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=akpm@osdl.org \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).