Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Andreas Johansson <ajo@wopr.campus.luth.se>
Subject: nfs module in 2.1.24/25
Date: Thu, 6 Feb 1997 18:46:47 +0100 (CET)	[thread overview]
Message-ID: <276e0eff0b6064d12265221057474c7f.axp-list@archive.invalid> (raw)

Sorry for the long letter.

I was trying the modules in linux 2.1.24, and when I tried nfs.o insmod
barfed hard. After a little research I concluded that kernel_thread
doesn't work with modules. This little module generates an Ooops 0 too:

/* Some includes ... */

static int my_thread(void *dummy)
{
        return (0);
}

int     init_module (void)
{
        printk ("test module installed.\n");
        kernel_thread(my_thread, NULL, 0);
        return 0;
}

void    cleanup_module (void)
{
        printk("test module removed\n");
}

This is the information from the oops:

Feb  6 17:57:02 wopr kernel: test module installed.
Feb  6 17:57:02 wopr kernel: Unable to handle kernel paging request at
virtual address b0290034203f0200
Feb  6 17:57:02 wopr kernel: insmod(5026): Oops 0
Feb  6 17:57:02 wopr kernel: pc = [<fffffc0000310f80>] ps = 0000
Feb  6 17:57:02 wopr kernel: rp = [<fffffc0000310fd4>] ra =
[<0000000000000002>]
Feb  6 17:57:02 wopr kernel: r0 = 0000000000000002  r1 = 0000000000000000
Feb  6 17:57:02 wopr kernel: r2 = b0290034203f0200  r3 = fffffc0003d8d018
Feb  6 17:57:02 wopr kernel: r4 = fffffc000041c3b0  r5 = fffffc00004948a8
Feb  6 17:57:02 wopr kernel: r6 = fffffc0000424620  r7 = 0000000000000000
Feb  6 17:57:02 wopr kernel: r8 = 0000000000000000  r9 = fffffe00000c2090
Feb  6 17:57:02 wopr kernel: r10= 0000000000000000  r11= fffffc0002674000
Feb  6 17:57:02 wopr kernel: r12= ffffffffffffffea  r13= 0000000000000002
Feb  6 17:57:02 wopr kernel: r14= 0000000120113dd0  r15= 0000000000000002
Feb  6 17:57:02 wopr kernel: r16= 0000000000000100  r17= fffffe00000c2090
Feb  6 17:57:02 wopr kernel: r18= 0000000000000000  r19= 6d5f686200000008
Feb  6 17:57:02 wopr kernel: r20= 0000000000008054  r21= 0000000020000000
Feb  6 17:57:02 wopr kernel: r22= 0000000000000000  r23= 0000000000000001
Feb  6 17:57:02 wopr kernel: r24= 0000000000000080  r25= 000000000000000a
Feb  6 17:57:02 wopr kernel: r27= fffffc0000310fb8  r28= 0000000000000000
Feb  6 17:57:02 wopr kernel: gp = fffffe00000ca188  sp = fffffc0001143d50
Feb  6 17:57:02 wopr kernel: Code: b67e0048  b69e0050  b6be0058 <a4420000>
b6de0060  b6fe0068  b71e0070  b73e0078  b75e0080 

I disassembled the kernel and this is where pc is:

fffffc0000310f28 <kernel_clone>:
    [...]
    34: 20 00 9e b4     stq     t3,32(sp)
    38: 78 82 5d a4     ldq     t1,-32136(gp)   <===== t1 read here
    3c: 28 00 be b4     stq     t4,40(sp)
    40: 30 00 de b4     stq     t5,48(sp)
    44: 38 00 fe b4     stq     t6,56(sp)
    48: 40 00 1e b5     stq     t7,64(sp)
    4c: 48 00 7e b6     stq     a3,72(sp)
    50: 50 00 9e b6     stq     a4,80(sp)
    54: 58 00 be b6     stq     a5,88(sp)
    58: 00 00 42 a4     ldq     t1,0(t1)	<====== pc is here
    5c: 60 00 de b6     stq     t8,96(sp)
    [...]
    80: e7 40 5b 6b     jsr     ra,(t12),fffffc0000311348 <sys_clone>

The kernel_clone function is directly called from __kernel_thread. The
offending instruction is generated from the SAVE_ALL macro:
#define SAVE_ALL                        \
        subq    $30,160,$30;            \
        stq     $0,0($30);              \
        stq     $1,8($30);              \
        stq     $2,16($30);             \
        stq     $3,24($30);             \
        stq     $4,32($30);             \
        lda     $2,hae;                 \	<=== $2 read here
        stq     $5,40($30);             \
        stq     $6,48($30);             \
        stq     $7,56($30);             \
        stq     $8,64($30);             \
        stq     $19,72($30);            \
        stq     $20,80($30);            \
        stq     $21,88($30);            \
        ldq     $2,HAE_CACHE($2);       \	<==== here
	[...]

So, the $2 register should contain the address to the hae, but instead it
contains random data (it seems some of the bytes are even ascii).
In another run the t1 register contained 0 instead of 0xb0290034203f0200.
I'm figuring gp is not ok, but I don't know where to look next.

The same behaviour can be observed in linux 2.1.25 i hear.

--

<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
: E-mail: ajo@wopr.campus.luth.se                                       :
: S-mail: Andreas Johansson, Karhusvagen 5  6:618, 977 54 Lulea, SWEDEN :
:     Have you had your dose of 261.62 BogoMIPS today? - Run Alpha!     :
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

                 reply	other threads:[~1997-02-06 17:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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