Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2013 16:58:48 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Joe Holden <lists@rewt.org.uk>
Cc:        Joe Holden <joe@rewt.org.uk>, "freebsd-mips@FreeBSD.org" <freebsd-mips@freebsd.org>
Subject:   Re: kern/177876: [mips] kernel stack overflow panic on mips64, EdgeRouter Lite
Message-ID:  <163C6DC2-D817-4176-BE96-ACAA56BD8F87@bsdimp.com>
In-Reply-To: <5176FB36.2070809@rewt.org.uk>
References:  <201304220300.r3M301iY093070@freefall.freebsd.org> <CAJ-Vmok7m9%2B3sky1swEP6ZTnZNLpkmwTC2tOqzGNaSFwY7WmFA@mail.gmail.com> <51753506.3070901@rewt.org.uk> <CAJ-VmomKi%2BpmZ6GAjds-=RXRET=aW65dsmxe3H4m%2BfdbxoecGw@mail.gmail.com> <CACVs6=8XdAgccufabeoXEXCFGGVZ_EWJ8c-KdRz4xr9SvBxrrw@mail.gmail.com> <EBE52100-4C0F-4B61-B872-CA30B99E2940@bsdimp.com> <CACVs6=8Hv5uF0zV=3%2BkZ=zsObSfQjiSY4t3op1EBytrunJdCGg@mail.gmail.com> <E13A6CE1-C0ED-420E-9BE4-28FA3EAD55EC@bsdimp.com> <5176FB36.2070809@rewt.org.uk>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail-4--243811575
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii


On Apr 23, 2013, at 3:20 PM, Joe Holden wrote:

> Warner Losh wrote:
>> I just committed r249790 which makes everything match.
>> On Apr 22, 2013, at 2:29 PM, Juli Mallett wrote:
>>> On Mon, Apr 22, 2013 at 1:27 PM, Warner Losh <imp@bsdimp.com> wrote:
>>>> It sure looks like you are right...  I have a full new tree =
building just to make sure... :(
>>>>=20
>>>> Then again, it would be useful to document where these dependencies =
lie to help prevent others from tripping over this in the future :(
>>> We should use genassym to generate trapframe offsets instead of =
having
>>> hand-coded defines for these, perhaps?  I haven't thought it through
>>> very fully, but that seems a lot better.
>> I'll look into this...
>> Warner
> I rebuilt just the kernel but the same problem persists - started =
building world and I'm seeing:
>=20
> /usr/src/gnu/usr.bin/gdb/kgdb/trgt_mips.c:122: error: 'struct =
trapframe' has no member named 't4'
>=20
> and so on, have just commented them out for now so it completes, may =
just be left overs from previous build - may be getting confused :)

You can just rebuild the kernel (I'll fix the kgdb stuff, I didn't see =
that when I built the world for some reason).

Please try this patch to see if this fixes it.

Warner

--Apple-Mail-4--243811575
Content-Disposition: attachment;
	filename=mips.diff
Content-Type: application/octet-stream;
	name="mips.diff"
Content-Transfer-Encoding: 7bit

Index: sys/mips/mips/trap.c
===================================================================
--- sys/mips/mips/trap.c	(revision 249790)
+++ sys/mips/mips/trap.c	(working copy)
@@ -363,10 +363,10 @@
 			/*
 			 * Non-o32 ABIs support more arguments in registers.
 			 */
-			sa->args[3] = locr0->t0;
-			sa->args[4] = locr0->t1;
-			sa->args[5] = locr0->t2;
-			sa->args[6] = locr0->t3;
+			sa->args[3] = locr0->a4;
+			sa->args[4] = locr0->a5;
+			sa->args[5] = locr0->a6;
+			sa->args[6] = locr0->a7;
 			nsaved += 4;
 #ifdef COMPAT_FREEBSD32
 		}
@@ -389,10 +389,10 @@
 			/*
 			 * Non-o32 ABIs support more arguments in registers.
 			 */
-			sa->args[4] = locr0->t0;
-			sa->args[5] = locr0->t1;
-			sa->args[6] = locr0->t2;
-			sa->args[7] = locr0->t3;
+			sa->args[4] = locr0->a4;
+			sa->args[5] = locr0->a5;
+			sa->args[6] = locr0->a6;
+			sa->args[7] = locr0->a7;
 			nsaved += 4;
 #ifdef COMPAT_FREEBSD32
 		}

--Apple-Mail-4--243811575--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?163C6DC2-D817-4176-BE96-ACAA56BD8F87>