All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
	linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/irq] x86: Always use irq stacks
Date: Fri, 23 Jul 2010 10:24:02 -0400	[thread overview]
Message-ID: <1279895042.3319.48.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1279894516.3319.44.camel@gandalf.stny.rr.com>

On Fri, 2010-07-23 at 10:15 -0400, Steven Rostedt wrote:
> On Wed, 2010-07-14 at 17:47 +0200, Christoph Hellwig wrote:

> In arch/x86/kernel/dumpstack_32.c:
> 
>                 context = (struct thread_info *)
>                         ((unsigned long)stack & (~(THREAD_SIZE - 1)));
>                 bp = ops->walk_stack(context, stack, bp, ops, data, NULL, &graph);
> 
> Note: here, context (which ends up being tinfo) is just a bitmasking of
> the current stack. If the stack is the irqstack, then what is passed to
> walk_stack() is not the actual thread info structure.
> 
> Note, if THREAD_SIZE is 8k and irqstacks are 4K then context is totally
> wrong here.

irqstacks are indeed 8k as well, but:

union irq_ctx {
        struct thread_info      tinfo;
        u32                     stack[THREAD_SIZE/sizeof(u32)];
} __attribute__((aligned(PAGE_SIZE)));


The stack is 8k, but it is aligned 4k. Which will have

   context = (struct thread_info *)
                  ((unsigned long)stack & (~(THREAD_SIZE - 1)));

not give the expected result.

So we should do:

} __attribute__((aligned(THREAD_SIZE)));

-- Steve



  reply	other threads:[~2010-07-23 14:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-28 12:15 [PATCH 1/2] x86: always use irq stacks Christoph Hellwig
2010-06-29 10:21 ` [tip:x86/irq] x86: Always " tip-bot for Christoph Hellwig
2010-06-30  7:44   ` Ingo Molnar
2010-06-30  7:52     ` Christoph Hellwig
2010-06-30  7:58       ` Ingo Molnar
2010-06-30  8:04         ` Ingo Molnar
2010-07-08 20:42           ` Ingo Molnar
2010-07-08 20:53             ` Christoph Hellwig
2010-07-14 15:12               ` Christoph Hellwig
2010-07-14 15:27                 ` Thomas Gleixner
2010-07-14 15:47                   ` Christoph Hellwig
2010-07-14 18:21                     ` Steven Rostedt
2010-07-27 12:13                       ` Christoph Hellwig
2010-07-27 16:29                         ` H. Peter Anvin
2010-07-27 18:36                         ` [tip:x86/irq] x86-32: Align IRQ stacks properly tip-bot for Christoph Hellwig
2010-07-23 14:15                     ` [tip:x86/irq] x86: Always use irq stacks Steven Rostedt
2010-07-23 14:24                       ` Steven Rostedt [this message]
2010-07-23 16:39                         ` Christoph Hellwig
2010-07-14 19:02                   ` David Miller
2010-09-03 15:00   ` Ingo Molnar
2010-09-06 18:53     ` Alexander van Heukelum
2010-09-07  4:06       ` [tip:x86/irq] x86, 32-bit: Align percpu area and irq stacks to THREAD_SIZE tip-bot for Alexander van Heukelum
2010-09-07  4:55       ` [tip:x86/irq] x86: Always use irq stacks Ingo Molnar
2010-09-07  8:21         ` Alexander van Heukelum

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=1279895042.3319.48.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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.