From: Ingo Molnar <mingo@elte.hu>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jiri Slaby <jirislaby@gmail.com>,
torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: GIT head no longer boots on x86-64
Date: Wed, 15 Oct 2008 13:51:53 +0200 [thread overview]
Message-ID: <20081015115153.GA16413@elte.hu> (raw)
In-Reply-To: <20081013164717.7a21084a@lxorguk.ukuu.org.uk>
* Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> > I guess SMP kernel running on UP? In such a case the module .text
>
> Yep
>
> > is patched to use UP locks before the module is added to the modules
> > list and it thinks there are no valid data at that place while
> > patching.
> >
> > Could you test it? The bug disappeared here in qemu. I've checked
> > callers of the function, and it should not matter for them.
>
> Seems to do the job.
Queued the fix below up in tip/x86/urgent for a merge to Linus later
today. Thanks!
Ingo
------------------>
>From 5870942537422066655816e971629aa729c023d8 Mon Sep 17 00:00:00 2001
From: Jiri Slaby <jirislaby@gmail.com>
Date: Mon, 13 Oct 2008 17:11:33 +0200
Subject: [PATCH] x86: fix CONFIG_DEBUG_VIRTUAL=y boot crash on x86-64
Alan reported a bootup crash in the module loader:
> BUG? vmalloc_to_page (from text_poke+0x30/0x14a): ffffffffa01e40b1
SMP kernel is running on UP, in such a case the module .text
is patched to use UP locks before the module is added to the modules
list and it thinks there are no valid data at that place while
patching.
Also the !is_module_address(addr) test is useless now.
Reported-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
---
include/linux/mm.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c61ba10..45772fd 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -267,6 +267,10 @@ static inline int is_vmalloc_addr(const void *x)
#ifdef CONFIG_MMU
unsigned long addr = (unsigned long)x;
+#ifdef CONFIG_X86_64
+ if (addr >= MODULES_VADDR && addr < MODULES_END)
+ return 1;
+#endif
return addr >= VMALLOC_START && addr < VMALLOC_END;
#else
return 0;
next prev parent reply other threads:[~2008-10-15 11:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-13 9:23 GIT head no longer boots on x86-64 Alan Cox
2008-10-13 10:13 ` Jiri Slaby
2008-10-13 10:20 ` Alan Cox
2008-10-13 10:56 ` Jiri Slaby
2008-10-13 13:35 ` Alan Cox
2008-10-13 15:03 ` Linus Torvalds
2008-10-13 15:11 ` Jiri Slaby
2008-10-13 15:47 ` Alan Cox
2008-10-15 11:51 ` Ingo Molnar [this message]
2008-10-15 13:19 ` Jiri Slaby
2008-10-15 15:06 ` Linus Torvalds
2008-10-15 15:33 ` Jiri Slaby
2008-10-15 16:01 ` Linus Torvalds
2008-10-15 20:31 ` Arjan van de Ven
2008-10-15 15:35 ` Linus Torvalds
2008-10-16 10:31 ` H. Peter Anvin
2008-10-13 14:45 ` Linus Torvalds
2008-10-13 14:50 ` Jiri Slaby
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=20081015115153.GA16413@elte.hu \
--to=mingo@elte.hu \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=torvalds@linux-foundation.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