From: Thomas Molina <tmolina@cablespeed.com>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: Mike Galbraith <efault@gmx.de>,
Zwane Mwaikambo <zwane@arm.linux.org.uk>,
<linux-kernel@vger.kernel.org>
Subject: Re: 2.6.0-test7 DEBUG_PAGEALLOC oops
Date: Sun, 12 Oct 2003 18:36:36 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.44.0310121831210.18583-200000@localhost.localdomain> (raw)
In-Reply-To: <3F88FB90.7080801@colorfullife.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 361 bytes --]
On Sun, 12 Oct 2003, Manfred Spraul wrote:
> Could you try the attached patch?
> It updates the end of stack detection to handle unaligned stacks.
I've attached a rediff of your patch against test7 bitkeeper. It has the
kstack_end function moved up above ASSEMBLY as suggested by Mike. I've
tested this version and it works for me (tm). Thanks a bunch.
[-- Attachment #2: Type: TEXT/PLAIN, Size: 2004 bytes --]
diff -ur linux-2.5-tma/arch/i386/kernel/traps.c linux-2.5-tm/arch/i386/kernel/traps.c
--- linux-2.5-tma/arch/i386/kernel/traps.c 2003-10-12 16:16:56.000000000 -0400
+++ linux-2.5-tm/arch/i386/kernel/traps.c 2003-10-12 15:05:48.000000000 -0400
@@ -104,7 +104,7 @@
#ifdef CONFIG_KALLSYMS
printk("\n");
#endif
- while (((long) stack & (THREAD_SIZE-1)) != 0) {
+ while (!kstack_end(stack)) {
addr = *stack++;
if (kernel_text_address(addr)) {
printk(" [<%08lx>] ", addr);
@@ -138,7 +138,7 @@
stack = esp;
for(i = 0; i < kstack_depth_to_print; i++) {
- if (((long) stack & (THREAD_SIZE-1)) == 0)
+ if (kstack_end(stack))
break;
if (i && ((i % 8) == 0))
printk("\n ");
diff -ur linux-2.5-tma/include/asm-i386/thread_info.h linux-2.5-tm/include/asm-i386/thread_info.h
--- linux-2.5-tma/include/asm-i386/thread_info.h 2003-10-12 16:16:28.000000000 -0400
+++ linux-2.5-tm/include/asm-i386/thread_info.h 2003-10-12 15:19:09.000000000 -0400
@@ -92,6 +92,16 @@
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)
+static inline int kstack_end(void *addr)
+{
+ unsigned long offset = (unsigned long)addr & (THREAD_SIZE-1);
+
+ /* Some APM bios versions misalign the stack */
+ if (offset == 0 || offset > (THREAD_SIZE-sizeof(void*)))
+ return 1;
+ return 0;
+}
+
#else /* !__ASSEMBLY__ */
/* how to get the thread information struct from ASM */
diff -ur linux-2.5-tma/mm/slab.c linux-2.5-tm/mm/slab.c
--- linux-2.5-tma/mm/slab.c 2003-10-12 16:24:14.000000000 -0400
+++ linux-2.5-tm/mm/slab.c 2003-10-12 15:05:48.000000000 -0400
@@ -862,7 +862,7 @@
unsigned long *sptr = &caller;
unsigned long svalue;
- while (((long) sptr & (THREAD_SIZE-1)) != 0) {
+ while (!kstack_end(sptr)) {
svalue = *sptr++;
if (kernel_text_address(svalue)) {
*addr++=svalue;
Only in linux-2.5-tm: stack.patch
next prev parent reply other threads:[~2003-10-12 22:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-11 9:37 Manfred Spraul
2003-10-11 11:15 ` Mike Galbraith
2003-10-11 12:06 ` Manfred Spraul
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 [this message]
-- 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=Pine.LNX.4.44.0310121831210.18583-200000@localhost.localdomain \
--to=tmolina@cablespeed.com \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--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 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®