From: David Howells <dhowells@redhat.com>
To: unlisted-recipients:; (no To-header on input)
Cc: dhowells@redhat.com, Pekka J Enberg <penberg@cs.helsinki.fi>,
clameter@sgi.com, mpm@selenic.com, lethal@linux-sh.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB
Date: Wed, 28 May 2008 15:27:09 +0100 [thread overview]
Message-ID: <29309.1211984829@redhat.com> (raw)
In-Reply-To: <2874.1211980355@redhat.com>
David Howells <dhowells@redhat.com> wrote:
> Works for SLAB and SLUB. SLOB breaks well before getting to anything these
> patches affect.
Okay, I've fixed things so that it gets things aligned properly with SLOB.
This patch doesn't work for SLOB because SLOB doesn't set PG_slab on its
pages. This causes:
kernel BUG at mm/nommu.c:129!
Or, as gdb sees it:
Break 00000002
Program received signal SIGABRT, Aborted.
0xc0055498 in kobjsize (objp=<value optimized out>) at mm/nommu.c:129
(gdb) list
124
125 if (PageCompound(page))
126 return PAGE_SIZE << compound_order(page);
127
128 BUG_ON(page->index < 0);
129 BUG_ON(page->index >= MAX_ORDER);
130
131 return (PAGE_SIZE << page->index);
132 }
133
(gdb) bt
#0 0xc0055498 in kobjsize (objp=<value optimized out>) at mm/nommu.c:129
#1 0xc0056408 in do_mmap_pgoff (file=0xc08f7d00, addr=3231711232, len=536128, prot=5,
flags=3758096383, pgoff=<value optimized out>) at mm/nommu.c:1010
#2 0xc008b988 in elf_fdpic_map_file (params=0xc0849eac, file=0xc08f7d00, mm=0xc0989ee0,
what=0xc01cc00c "executable") at mm.h:1105
#3 0xc008cb98 in load_elf_fdpic_binary (bprm=0xc0988e68, regs=<value optimized out>)
at fs/binfmt_elf_fdpic.c:345
#4 0xc0060d90 in search_binary_handler (bprm=0xc0988e68, regs=0xc0849f90) at fs/exec.c:1215
#5 0xc0061d24 in do_execve (filename=<value optimized out>, argv=0xc01e1c38, envp=0xc01e1bb0,
regs=0xc0849f90) at fs/exec.c:1327
#6 0xc000aab0 in sys_execve (name=<value optimized out>, argv=0xc01e1c38, envp=0xc01e1bb0)
at arch/frv/kernel/process.c:267
#7 0xc00095e0 in __syscall_call () at arch/frv/kernel/entry.S:898
#8 0xc00095e0 in __syscall_call () at arch/frv/kernel/entry.S:898
(gdb) p/x *page
$3 = {flags = 0x40000840, _count = {counter = 0x1}, {_mapcount = {counter = 0x1cfbffff}, {
inuse = 0x1cfb, objects = 0xffff}}, {{private = 0x0, mapping = 0x0}, slab = 0x0,
first_page = 0x0}, {index = 0xc0980056, freelist = 0xc0980056}, lru = {next = 0xc08107b8,
prev = 0xc01e51f0}}
(gdb) up
#1 0xc0056408 in do_mmap_pgoff (file=0xc08f7d00, addr=3231711232, len=536128, prot=5,
flags=3758096383, pgoff=<value optimized out>) at mm/nommu.c:1010
(gdb) list
1005 if (vma->vm_flags & VM_MAPPED_COPY) {
1006 realalloc += kobjsize(result);
1007 askedalloc += len;
1008 }
1009
1010 realalloc += kobjsize(vma);
1011 askedalloc += sizeof(*vma);
1012
1013 current->mm->total_vm += len >> PAGE_SHIFT;
1014
PG_active is set (0x00000040), but not PG_slab (0x00000080). The VMA object
in question is allocated using kzalloc().
David
next prev parent reply other threads:[~2008-05-28 14:27 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 16:09 [PATCH] nommu: fix kobjsize() for SLOB and SLUB Pekka J Enberg
2008-05-22 16:48 ` Christoph Lameter
2008-05-22 23:40 ` Paul Mundt
2008-05-22 23:45 ` Christoph Lameter
2008-05-22 23:50 ` Paul Mundt
2008-05-23 0:04 ` Christoph Lameter
2008-05-28 13:12 ` David Howells
2008-05-28 13:17 ` Pekka J Enberg
2008-05-28 13:40 ` David Howells
2008-05-28 14:09 ` David Howells
2008-05-28 17:26 ` Christoph Lameter
2008-05-28 17:38 ` David Howells
2008-05-28 20:35 ` Mike Frysinger
2008-05-29 13:03 ` David Howells
2008-05-29 20:25 ` Mike Frysinger
2008-05-29 20:30 ` Christoph Lameter
2008-05-29 20:51 ` Mike Frysinger
2008-05-29 21:29 ` Christoph Lameter
2008-05-30 4:18 ` Mike Frysinger
2008-05-28 14:27 ` David Howells [this message]
[not found] <Pine.LNX.4.64.0805281646470.27125@sbz-30.cs.Helsinki.FI>
[not found] ` <20080528153648.GA27783@linux-sh.org>
2008-05-28 20:03 ` Pekka Enberg
2008-05-28 20:25 ` Christoph Lameter
2008-05-28 20:25 ` Pekka Enberg
2008-05-28 20:29 ` Christoph Lameter
2008-05-29 13:08 ` David Howells
2008-05-29 13:21 ` Pekka J Enberg
2008-05-29 21:12 ` Paul Mundt
2008-06-01 7:58 ` Pekka Enberg
2008-06-01 8:22 ` Pekka J Enberg
2008-06-01 8:24 ` Paul Mundt
2008-06-01 8:36 ` Pekka J Enberg
2008-06-01 9:13 ` Pekka J Enberg
2008-06-01 10:24 ` Paul Mundt
2008-06-01 10:29 ` Pekka Enberg
2008-06-01 11:21 ` Paul Mundt
2008-06-01 11:30 ` Pekka J Enberg
2008-06-02 5:59 ` Paul Mundt
2008-06-02 6:32 ` Pekka Enberg
2008-06-02 6:50 ` Paul Mundt
2008-06-02 6:58 ` Pekka Enberg
2008-06-02 7:01 ` Paul Mundt
2008-06-01 8:22 ` Paul Mundt
2008-05-29 15:00 ` Christoph Lameter
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=29309.1211984829@redhat.com \
--to=dhowells@redhat.com \
--cc=clameter@sgi.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=penberg@cs.helsinki.fi \
/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