All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Mike Galbraith <efault@gmx.de>
Cc: Zwane Mwaikambo <zwane@arm.linux.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.0-test7 DEBUG_PAGEALLOC oops
Date: Sat, 11 Oct 2003 14:06:12 +0200	[thread overview]
Message-ID: <3F87F234.1060704@colorfullife.com> (raw)
In-Reply-To: <5.2.1.1.2.20031011120059.01e81718@pop.gmx.net>

Mike Galbraith wrote:

>>
>>> eax: 00000000   ebx: c7802f98   ecx: c0301390   edx: c030138c
>>> esi: c0349ffe   edi: 017e0008   ebp: c0349da6   esp: c0349d96
>>> ds: 007b   es: 007b   ss: 0068
>>> Process swapper (pid: 0, threadinfo=c0348000 task=c02fcbe0)
>>
>> The esp value is sane, the stack is at 0xc0348000, and the fault is 
>> at 'a000: just behind the end of the stack. 
>
I'm blind. The esp value is the culprit:
It's not 32-bit aligned. Someone misaligned the stack, and thus
    if(stack_ptr & (THREAD_SIZE-1))
didn't notice the end of the stack.
The generated assembly of store_slabinfo is correct:
     1d2:       f7 c6 ff 1f 00 00       test   $0x1fff,%esi
Check sptr against THREAD_SIZE -1
     1d8:       74 21                   je     1fb <store_stackinfo+0x6f>
     1da:       8b 3e                   mov    (%esi),%edi
And load *sptr.


>> It looks like store stackinfo accesses memory behind the end of the 
>> stack.
>
>
> Yeah, I'm trying to figure out why.  The below (if dang mailer 
> actually inlines it) kludge allows me to boot, so I suppose I need to 
> ponder addr wrt _stext and _etext.

Wrong direction:  Right now it crashes because it runs over the end of 
the stack.
With your patch applied, the allocated object is too small to hold all 
entries on the stack, and thus store_stackinfo aborts before it runs 
into the next page.

I'd increase kstack_depth_to_print to 140. Do not increase it too much, 
otherwise it will oops due to the misaligned stack.
Then check the EBP values: They are pushed after the return address. The 
return addresses are listed in the Call Trace section.
Example:
0xc01316aa8 pushes 0xc0349dd6 -> odd.
0xc0131b6c pushes 0xc0349de6 -> odd.

0xc0131b3e pushes c0349e02 -> odd.

Proper values for EBP are multiples of 4. One you find where the stack got misaligned, disassemble the offending function (or send me the .o file)


--
    Manfred


  reply	other threads:[~2003-10-11 12:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-11  9:37 2.6.0-test7 DEBUG_PAGEALLOC oops Manfred Spraul
2003-10-11 11:15 ` Mike Galbraith
2003-10-11 12:06   ` Manfred Spraul [this message]
2003-10-11 15:52     ` Mike Galbraith
2003-10-11 17:34       ` Manfred Spraul
2003-10-12  5:11         ` Mike Galbraith
2003-10-12  6:58           ` Manfred Spraul
2003-10-12  8:52             ` Mike Galbraith
2003-10-12 12:08               ` Thomas Molina
2003-10-12 14:13                 ` Thomas Molina
2003-10-12 22:36             ` Thomas Molina
  -- strict thread matches above, loose matches on Subject: below --
2003-10-09 13:04 2.6.0-test7 oops in proc_pid_stat Olaf Hering
2003-10-09 22:04 ` Linus Torvalds
2003-10-10  6:50   ` 2.6.0-test7 DEBUG_PAGEALLOC oops Mike Galbraith
2003-10-10 16:52     ` Zwane Mwaikambo
2003-10-11  7:01       ` Mike Galbraith
2003-10-11  7:03         ` Zwane Mwaikambo

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=3F87F234.1060704@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zwane@arm.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.