From: Andrew Lutomirski <luto@mit.edu>
To: Petr Tesarik <ptesarik@suse.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: bug: kernel 3.0-rc3 not relocatable on i386?
Date: Wed, 15 Jun 2011 07:17:00 -0400 [thread overview]
Message-ID: <BANLkTi=eGtMpcKaOBH_c_dt3GNQTbZ2fPQ@mail.gmail.com> (raw)
In-Reply-To: <1308125533.4641.33.camel@nathan.suse.cz>
On Wed, Jun 15, 2011 at 4:12 AM, Petr Tesarik <ptesarik@suse.cz> wrote:
> Hi all,
>
> it seems that the 3.0-rc3 kernel is not relocatable on i386. I get
> warnings about jiffies being an absolute symbol, and indeed, when GRUB
> loads the kernel at a non-default address, jiffies is not relocated.
>
> In my example the kernel is configured with
> CONFIG_PHYSICAL_START=0x1000000
> CONFIG_PHYSICAL_ALIGN=0x200000
> CONFIG_RELOCATABLE=y
> and loaded at 0x200000 by GRUB.
>
> Booting fails when checking whether the timer works, because do_timer()
> increments jiffies_64, but timer_irq_works() checks jiffies. The code
> looks like this:
>
> c13daab7: 8b 3d 40 7a 39 c1 mov 0xc1397a40,%edi
>
> but arch/x86/boot/compressed/vmlinux.relocs does not contain c13daaba.
> Consequently, timer_irq_works() reads the wrong memory location and
> fails, causing a panic:
>
> kernel panic: IO-APIC + timer doesn't work! Boot with apic=debug and
> send a report. Then try booting with the 'noapic' option.
>
> Needless to say, the kernel freezes a few initcalls later when booted
> with noapic, because IO-APIC worked fine, in fact. I verified that by
> inserting a debugging printk() in do_timer(), and I also verified with
> that printk() that the address of jiffies_64 and the address of jiffies
> differ at run time.
>
> Any idea how to fix this?
This could be a regression in
8c49d9a74bac5ea3f18480307057241b808fcc0c, but I haven't spotted it
yet. I'm having trouble reproducing this, though: I see the
relocation in the output of relocs --text.
Can you send me your .config? I'll fiddle with it.
--Andy
prev parent reply other threads:[~2011-06-15 11:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-15 8:12 Petr Tesarik
2011-06-15 9:21 ` Maarten Lankhorst
2011-06-15 10:01 ` Petr Tesarik
2011-06-15 10:07 ` Petr Tesarik
2011-06-15 10:28 ` Maarten Lankhorst
2011-06-15 12:26 ` Petr Tesarik
2011-06-15 9:36 ` Maarten Lankhorst
2011-06-15 9:58 ` Petr Tesarik
2011-06-15 11:17 ` Andrew Lutomirski [this message]
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='BANLkTi=eGtMpcKaOBH_c_dt3GNQTbZ2fPQ@mail.gmail.com' \
--to=luto@mit.edu \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=ptesarik@suse.cz \
--cc=tglx@linutronix.de \
--cc=x86@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
all inboxes | Powered by JetHome®