mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luca Tettamanti" <kronos.it@gmail.com>
To: "Yinghai Lu" <yhlu.kernel@gmail.com>
Cc: "Ingo Molnar" <mingo@elte.hu>, "H. Peter Anvin" <hpa@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, mingo@redhat.com
Subject: Re: [2.6.27] overlapping early reservations [was: early exception - lockdep related?]
Date: Mon, 8 Sep 2008 19:54:44 +0200	[thread overview]
Message-ID: <68676e00809081054j3fb9c5bq76c9a6aceea35aa2@mail.gmail.com> (raw)
In-Reply-To: <86802c440809060906h721d6243t4a3b5fb604a9d7b3@mail.gmail.com>

On Sat, Sep 6, 2008 at 6:06 PM, Yinghai Lu <yhlu.kernel@gmail.com> wrote:
> On Sat, Sep 6, 2008 at 7:51 AM, Ingo Molnar <mingo@elte.hu> wrote:
>>
>> * Luca Tettamanti <kronos.it@gmail.com> wrote:
>>
>>> On Fri, Sep 5, 2008 at 10:18 PM, H. Peter Anvin <hpa@kernel.org> wrote:
>>> > Peter Zijlstra wrote:
>>> >>
>>> >> On Fri, 2008-09-05 at 21:17 +0200, Luca Tettamanti wrote:
>>> >>>
>>> >>> On Thu, Sep 4, 2008 at 10:51 PM, Luca Tettamanti <kronos.it@gmail.com>
>>> >>> wrote:
>>> >>>>
>>> >>>> On Thu, Sep 4, 2008 at 4:25 PM, Peter Zijlstra <peterz@infradead.org>
>>> >>>> wrote:
>>> >>>>>
>>> >>>>> Sadly your config just boots, albeit not to userspace due to missing
>>> >>>>> drivers.
>>> >>>>
>>> >>>> Yes, I managed to boot it with qemu... I tried kgdb - without luck -
>>> >>>> kernel dies too early.
>>> >>>> I also managed to get a stack trace :D
>>> >>>>
>>> >>>> http://img151.imageshack.us/my.php?image=tracedm1.jpg
>>> >>>>
>>> >>>> It seems that lockdep is an innocent bystander... the kernel died with
>>> >>>> panic() in __reserve_early, and then took another exception while
>>> >>>> printing the panic (I guess).
>>> >>>> Will add further debug stuff to see wtf is going on.
>>> >>>
>>> >>> Hum, kernel says:
>>> >>>
>>> >>> http://img177.imageshack.us/my.php?image=overlappingus2.jpg
>>> >>>
>>> >>> Overlapping early reservations b98000-eff266 RAMDISK to 200000-d09cf7
>>> >>> TEXT DATA BSS
>>> >>>
>>> >>> It would appear that the initramfs is overlapping the kernel itself,
>>> >>> is the boot loader (LILO) doing something stupid?
>>> >>
>>> >> Suppose it is, lets ask hpa..
>>> >>
>>> >
>>> > It definitely looks like it.
>>>
>>> Is there anything that the kernel could to do confuse lilo? The issue
>>> started appearing with 2.6.27 and the outcome of the boot process
>>> varies between versions and seems sensitive to configuration changes
>>> (though a "bad" kernel consistently fails).
>>
>> good question. Does your successful 2.6.26 bootup actually _depend_ on
>> the initrd? Or does it perhaps have enough built-in drivers that make it
>> boot just fine?
>>
>> in that case v2.6.26 might just have stomped on the initrd silently,
>> corrupted it (during kernel decompress), and the initrd unpacker saw the
>> corruption and ignored it. Userspace wouldnt care as the kernel had all
>> the drivers it needed.
>>
>> or perhaps something made your v2.6.27 bzImage larger so that the
>> overlap happens - while it didnt before.
>>
>>> Orthogonal to my problem: the panic() in reserve_early is useless for
>>> debugging since the output won't reach the screen or the serial
>>> console (even worse: the kernel takes an exception while trying to
>>> execute the panic). Is it acceptable to replace it with an
>>> early_printk + hlt?
>>
>> very much so. I was wondering about that already.
>
> console=uart8250,io,0x3f8,115200n8
> could help

Nope, parse_early_param() is called in start_kernel(), my kernel dies
way before it...

> wonder if lilo is fixing bzImage from 1M, and when it is calculating
> pos of ramdisk...base that
> later on-same-position uncompressing, put vmlinux from 2M...

How does LILO decides where to put the initrd (I find LILO code...
obscure)? I mean, it gets a compressed image: how does it know the
size of the uncompressed kernel image? Is it the payload_length in the
real mode header? (answer to self: no, it appears to be the compressed
payload).

> wonder if new lilo could help.

I'm already using the latest version.

Luca

  reply	other threads:[~2008-09-08 17:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-05 19:17 Luca Tettamanti
2008-09-05 19:25 ` Peter Zijlstra
2008-09-05 20:18   ` H. Peter Anvin
2008-09-06 13:20     ` Luca Tettamanti
2008-09-06 14:51       ` Ingo Molnar
2008-09-06 16:06         ` Yinghai Lu
2008-09-08 17:54           ` Luca Tettamanti [this message]
2008-09-08 18:04             ` Yinghai Lu
2008-09-08 19:14               ` Luca Tettamanti
2008-09-08 19:35                 ` Yinghai Lu
2008-09-08 20:00                   ` Luca Tettamanti
2008-09-08 20:46                     ` Yinghai Lu
2008-09-08 21:25                       ` Luca Tettamanti
2008-09-08 22:32                         ` Yinghai Lu
2008-09-09 21:48                           ` Luca Tettamanti
2008-09-06 17:20         ` Luca Tettamanti
2008-09-06 17:25           ` Ingo Molnar
2008-09-06 17:29             ` Luca Tettamanti
2008-09-06 13:41     ` Ingo Molnar
2008-09-06 16:14       ` Yinghai Lu
     [not found] <b8P0N-3Dp-11@gated-at.bofh.it>
     [not found] ` <b8PaB-3Or-23@gated-at.bofh.it>
     [not found]   ` <b8Q6x-51x-11@gated-at.bofh.it>
     [not found]     ` <b961C-rW-9@gated-at.bofh.it>
     [not found]       ` <b97qL-26L-15@gated-at.bofh.it>
2008-09-07 16:47         ` Bodo Eggert
2008-09-08  4:26           ` H. Peter Anvin
2008-09-08 14:30           ` Ingo Molnar

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=68676e00809081054j3fb9c5bq76c9a6aceea35aa2@mail.gmail.com \
    --to=kronos.it@gmail.com \
    --cc=hpa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yhlu.kernel@gmail.com \
    /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

all inboxes | Powered by JetHome®