public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* unwabi mismatch in 2.4.X kernels breaks oops call trace (unwind)
@ 2004-02-10  0:48 Bob Montgomery
  2004-02-10  1:28 ` David Mosberger
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bob Montgomery @ 2004-02-10  0:48 UTC (permalink / raw)
  To: linux-ia64

Oops stack unwinding was broken in 2.4.22 by this patch that was
picked up from 2.5/2.6:
                               
--- 1.5/arch/ia64/kernel/entry.h	Mon Feb  9 13:41:40 2004
+++ 1.6/arch/ia64/kernel/entry.h	Mon Feb  9 13:41:40 2004
@@ -14,7 +14,7 @@
 #define SW(f)		(IA64_SWITCH_STACK_##f##_OFFSET)
 
 #define PT_REGS_SAVES(off)			\
-	.unwabi @svr4, 'i';			\
+	.unwabi 3, 'i';				\
 	.fframe IA64_PT_REGS_SIZE+16+(off);	\
 	.spillsp rp, PT(CR_IIP)+16+(off);	\
 	.spillsp ar.pfs, PT(CR_IFS)+16+(off);	\


If we want to keep this change in 2.4.X, we need to also change the
test in desc_abi (unwind.c) to check for abi = 3 instead of 0.

static inline void
desc_abi (unsigned char abi, unsigned char context, struct unw_state_record *sr){
        if (abi = 0 && context = 'i') {
                sr->flags |= UNW_FLAG_INTERRUPT_FRAME;
                UNW_DPRINT(3, "unwind.%s: interrupt frame\n", __FUNCTION__);
        }
        else
                UNW_DPRINT(0, "unwind%s: ignoring unwabi(abi=0x%x,context=0x%x)\n",
                                __FUNCTION__, abi, context);
}

Otherwise we can just back the entry.h patch out.  So my question
is: Is there a compelling reason to change the abi number from 0 to
3 in 2.4.X kernels?  Is there an outside tool that cares, or is it
sufficient for these two snippets of kernel code to merely agree on
some number?

Thanks,
Bob Montgomery



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

* Re: unwabi mismatch in 2.4.X kernels breaks oops call trace (unwind)
  2004-02-10  0:48 unwabi mismatch in 2.4.X kernels breaks oops call trace (unwind) Bob Montgomery
@ 2004-02-10  1:28 ` David Mosberger
  2004-02-10 20:43 ` Bjorn Helgaas
  2004-02-10 20:56 ` David Mosberger
  2 siblings, 0 replies; 4+ messages in thread
From: David Mosberger @ 2004-02-10  1:28 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Mon, 09 Feb 2004 17:48:57 -0700, Bob Montgomery <bob.montgomery@hp.com> said:

  Bob> So my question is: Is there a compelling reason to change the
  Bob> abi number from 0 to 3 in 2.4.X kernels?

It must change iff the syscall-streamlining patch is applied, since
that patch changes the format of the pt-regs structure.

  Bob> Is there an outside tool that cares

Libunwind and, for example, Ski definitely care.

	--david

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

* Re: unwabi mismatch in 2.4.X kernels breaks oops call trace (unwind)
  2004-02-10  0:48 unwabi mismatch in 2.4.X kernels breaks oops call trace (unwind) Bob Montgomery
  2004-02-10  1:28 ` David Mosberger
@ 2004-02-10 20:43 ` Bjorn Helgaas
  2004-02-10 20:56 ` David Mosberger
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2004-02-10 20:43 UTC (permalink / raw)
  To: linux-ia64

On Monday 09 February 2004 6:28 pm, David Mosberger wrote:
> >>>>> On Mon, 09 Feb 2004 17:48:57 -0700, Bob Montgomery <bob.montgomery@hp.com> said:
> 
>   Bob> So my question is: Is there a compelling reason to change the
>   Bob> abi number from 0 to 3 in 2.4.X kernels?
> 
> It must change iff the syscall-streamlining patch is applied, since
> that patch changes the format of the pt-regs structure.

In 2.4, we have this patch:

	ia64: Restructure pt_regs and optimize syscall path.

	Patch by Rohit Seth, Fengua Yu, and Arun Sharma:

	The main items covered by this patch are:
	1) Support for 16 bytes instructions as per SDM2.1 (CSD/SSD in pt_regs)
	2) f10-f11 are added as additional scratch registers for kernel's use.
	3) Re-arrange pt_regs to access less cache lines in system call. Reduce
	scratch register saving/restoring in system call path.
	4) A few instruction reorg in low-level code.

(See this link for details: http://lia64.bkbits.net:8080/linux-ia64-2.4/cset@1.1019.9.3)

So I assume the right thing to do is to apply the following patch to 2.4.
I'll do this later today unless anybody objects.

=== arch/ia64/kernel/unwind.c 1.27 vs edited ==--- 1.27/arch/ia64/kernel/unwind.c	Thu Aug 14 11:26:15 2003
+++ edited/arch/ia64/kernel/unwind.c	Tue Feb 10 13:41:51 2004
@@ -826,7 +826,7 @@
 static inline void
 desc_abi (unsigned char abi, unsigned char context, struct unw_state_record *sr)
 {
-	if (abi = 0 && context = 'i') {
+	if (abi = 3 && context = 'i') {
 		sr->flags |= UNW_FLAG_INTERRUPT_FRAME;
 		UNW_DPRINT(3, "unwind.%s: interrupt frame\n",  __FUNCTION__);
 	}


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

* Re: unwabi mismatch in 2.4.X kernels breaks oops call trace (unwind)
  2004-02-10  0:48 unwabi mismatch in 2.4.X kernels breaks oops call trace (unwind) Bob Montgomery
  2004-02-10  1:28 ` David Mosberger
  2004-02-10 20:43 ` Bjorn Helgaas
@ 2004-02-10 20:56 ` David Mosberger
  2 siblings, 0 replies; 4+ messages in thread
From: David Mosberger @ 2004-02-10 20:56 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Tue, 10 Feb 2004 13:43:10 -0700, Bjorn Helgaas <bjorn.helgaas@hp.com> said:

  Bjorn> So I assume the right thing to do is to apply the following
  Bjorn> patch to 2.4.

Yes.  Looks like that's a bit that got dropped during the backport
from 2.5.

	--david

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

end of thread, other threads:[~2004-02-10 20:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-10  0:48 unwabi mismatch in 2.4.X kernels breaks oops call trace (unwind) Bob Montgomery
2004-02-10  1:28 ` David Mosberger
2004-02-10 20:43 ` Bjorn Helgaas
2004-02-10 20:56 ` David Mosberger

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