The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* Re: 2.6.18-rc3-g3b445eea BUG: warning at /usr/src/linux-git/kernel/cpu.c:51
@ 2006-08-08  0:39 Chuck Ebbert
  2006-08-08  6:36 ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Chuck Ebbert @ 2006-08-08  0:39 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Andi Kleen, Michal Piotrowski, Dave Jones, linux-kernel,
	Andrew Morton

In-Reply-To: <44D7136E.76E4.0078.0@novell.com>

On Mon, 07 Aug 2006 09:18:22 +0100, Jan Beulich wrote:

> >Most likely the CFI annotation for that sysenter path is not complete.
>
> Correct, the return point of sysexit (SYSENTER_RETURN) is still in kernel space,
> but its annotations are invisible to the unwinder. We should make the VDSO be
> treated as user-mode code despite living above PAGE_OFFSET.

Umm, that's already been done?

include/asm-i386/unwind.h::arch_unw_user_mode():
        return info->regs.eip < PAGE_OFFSET
               || (info->regs.eip >= __fix_to_virt(FIX_VDSO)
                    && info->regs.eip < __fix_to_virt(FIX_VDSO) + PAGE_SIZE)
               || info->regs.esp < PAGE_OFFSET;


Could this be the problem?

|ENTRY(sysenter_entry)
|        CFI_STARTPROC simple
|        CFI_DEF_CFA esp, 0
|==>     CFI_REGISTER esp, ebp
|        movl TSS_sysenter_esp0(%esp),%esp
|sysenter_past_esp:

What does that do?  .cfi_register is not documented anywhere, not
even in the gnu.org online documentation for gas.  (I spent 10
minutes googling and found nothing other than the changeset that
added it to gas.)

-- 
Chuck


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.6.18-rc3-g3b445eea BUG: warning at  /usr/src/linux-git/kernel/cpu.c:51
  2006-08-08  0:39 2.6.18-rc3-g3b445eea BUG: warning at /usr/src/linux-git/kernel/cpu.c:51 Chuck Ebbert
@ 2006-08-08  6:36 ` Jan Beulich
  2006-08-08  6:49   ` Andi Kleen
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2006-08-08  6:36 UTC (permalink / raw)
  To: Chuck Ebbert
  Cc: Michal Piotrowski, Andrew Morton, Dave Jones, Andi Kleen,
	linux-kernel

>>> Chuck Ebbert <76306.1226@compuserve.com> 08.08.06 02:39 >>>
>In-Reply-To: <44D7136E.76E4.0078.0@novell.com>
>
>On Mon, 07 Aug 2006 09:18:22 +0100, Jan Beulich wrote:
>
>> >Most likely the CFI annotation for that sysenter path is not complete.
>>
>> Correct, the return point of sysexit (SYSENTER_RETURN) is still in kernel space,
>> but its annotations are invisible to the unwinder. We should make the VDSO be
>> treated as user-mode code despite living above PAGE_OFFSET.
>
>Umm, that's already been done?
>
>include/asm-i386/unwind.h::arch_unw_user_mode():
>        return info->regs.eip < PAGE_OFFSET
>               || (info->regs.eip >= __fix_to_virt(FIX_VDSO)
>                    && info->regs.eip < __fix_to_virt(FIX_VDSO) + PAGE_SIZE)
>               || info->regs.esp < PAGE_OFFSET;

Hmm, indeed. Then I'm unclear what the problem might be here.

>Could this be the problem?
>
>|ENTRY(sysenter_entry)
>|        CFI_STARTPROC simple
>|        CFI_DEF_CFA esp, 0
>|==>     CFI_REGISTER esp, ebp
>|        movl TSS_sysenter_esp0(%esp),%esp
>|sysenter_past_esp:

Clearly not. That is the way the user stack gets communicated to the kernel,
and it would cause problems at earliest in the next outer frame (which is in
user mode, so we don't care anyway). And I know I saw it unwind properly
through the sysenter code in other cases in the past.

>What does that do?  .cfi_register is not documented anywhere, not
>even in the gnu.org online documentation for gas.  (I spent 10
>minutes googling and found nothing other than the changeset that
>added it to gas.)

.cfi_register is the directive equivalent to DW_CFA_register, saying that
on register is spilled to another (rather than to memory) - see the Dwarf2
(or Dwarf3) specification for details.

Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.6.18-rc3-g3b445eea BUG: warning at  /usr/src/linux-git/kernel/cpu.c:51
  2006-08-08  6:36 ` Jan Beulich
@ 2006-08-08  6:49   ` Andi Kleen
  2006-08-08  7:00     ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2006-08-08  6:49 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Chuck Ebbert, Michal Piotrowski, Andrew Morton, Dave Jones,
	linux-kernel


> >include/asm-i386/unwind.h::arch_unw_user_mode():
> >        return info->regs.eip < PAGE_OFFSET
> >               || (info->regs.eip >= __fix_to_virt(FIX_VDSO)
> >                    && info->regs.eip < __fix_to_virt(FIX_VDSO) + PAGE_SIZE)
> >               || info->regs.esp < PAGE_OFFSET;
> 
> Hmm, indeed. Then I'm unclear what the problem might be here.

That code will check for the vsyscall page, but sysenter_entry isn't 
in the vsyscall page, but in the kernel proper.

So it means the EIP never actually reached the vsyscall page. It should
have gone up another level, but didn't.

-Andi

> 
> >Could this be the problem?
> >
> >|ENTRY(sysenter_entry)
> >|        CFI_STARTPROC simple
> >|        CFI_DEF_CFA esp, 0
> >|==>     CFI_REGISTER esp, ebp
> >|        movl TSS_sysenter_esp0(%esp),%esp
> >|sysenter_past_esp:

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.6.18-rc3-g3b445eea BUG: warning at  /usr/src/linux-git/kernel/cpu.c:51
  2006-08-08  6:49   ` Andi Kleen
@ 2006-08-08  7:00     ` Jan Beulich
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2006-08-08  7:00 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Chuck Ebbert, Michal Piotrowski, Andrew Morton, Dave Jones,
	linux-kernel

>>> Andi Kleen <ak@suse.de> 08.08.06 08:49 >>>
>
>> >include/asm-i386/unwind.h::arch_unw_user_mode():
>> >        return info->regs.eip < PAGE_OFFSET
>> >               || (info->regs.eip >= __fix_to_virt(FIX_VDSO)
>> >                    && info->regs.eip < __fix_to_virt(FIX_VDSO) + PAGE_SIZE)
>> >               || info->regs.esp < PAGE_OFFSET;
>> 
>> Hmm, indeed. Then I'm unclear what the problem might be here.
>
>That code will check for the vsyscall page, but sysenter_entry isn't 
>in the vsyscall page, but in the kernel proper.
>
>So it means the EIP never actually reached the vsyscall page. It should
>have gone up another level, but didn't.

I think we had seen sysenter_past_esp in the stack trace, so it did reach
that function. The next outer level should be the VDSO page, shouldn't it?

Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.6.18-rc3-g3b445eea BUG: warning at /usr/src/linux-git/kernel/cpu.c:51
@ 2006-08-17 20:03 Chuck Ebbert
  0 siblings, 0 replies; 5+ messages in thread
From: Chuck Ebbert @ 2006-08-17 20:03 UTC (permalink / raw)
  To: Jan Beulich
  Cc: linux-kernel, Andi Kleen, Andrew Morton, Michal Piotrowski,
	Linus Torvalds, Dave Jones

In-Reply-To: <44E1D8CD.76E4.0078.0@novell.com>

On Tue, 15 Aug 2006 14:23:09 +0200, Jan Beulich wrote:

> Again, if "unwinder stuck" messages appear, I'll need a raw
> stack dump to accompany the stack trace.

So people who want to help debug the stuck unwinder should be
booting with "kstack=2048" on i386 in order to get the full stack
dump.

-- 
Chuck


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-08-17 20:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-08  0:39 2.6.18-rc3-g3b445eea BUG: warning at /usr/src/linux-git/kernel/cpu.c:51 Chuck Ebbert
2006-08-08  6:36 ` Jan Beulich
2006-08-08  6:49   ` Andi Kleen
2006-08-08  7:00     ` Jan Beulich
  -- strict thread matches above, loose matches on Subject: below --
2006-08-17 20:03 Chuck Ebbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox