Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Richard Henderson <richard@stommel.tamu.edu>
Subject: Re: LKMs and installing syscalls on Linux/alpha 2.0.27 (resend)
Date: Thu, 22 May 1997 15:40:47 -0500 (CDT)	[thread overview]
Message-ID: <199705222040.PAA20082@stommel.tamu.edu> (raw)
In-Reply-To: <Pine.LNX.3.95L01at.970522170543.13615C-100000@wopr.campus.luth.se>

Your analysis of the problem is correct, Andreas.  We have not
allowed for proper handling of the gp in the presense of modules
across the system call.

> --- arch/alpha/kernel/entry.S.orig	Thu May 22 17:38:29 1997
> +++ arch/alpha/kernel/entry.S	Thu May 22 17:41:24 1997
> @@ -521,6 +521,7 @@
>  	cmovne	$26,0,$19		/* $19 = 0 => non-restartable */
> +	ldgp    $29,0($27)

The patch isn't right though because $27 does not contain the 
address of the PC.  Moreover within ret_from_sys_call itself
there is nothing convenient, since it is used somewhat specially
in things like execve and fork.

We can still get things right, but we have to do them a bit
earlier.  This is against 2.1.36, but I think things are 
unchanged from 2.0.0 in the vicinity.

--- entry.S.orig        Thu May 22 15:31:23 1997
+++ entry.S     Thu May 22 15:32:19 1997
@@ -512,6 +512,7 @@
        beq     $4,1f
        ldq     $27,0($5)
 1:     jsr     $26,($27),do_entSys
+       ldgp    $29,0($26)
        blt     $0,syscall_error        /* the call failed */
        stq     $0,0($30)
        stq     $31,72($30)             /* a3=0 => no error */

I'm not at my machine, so this is untried, but I fail to see 
what could go wrong.  ;-)

r~

--
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-05-22 20:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.3.95L01at.970522170543.13615C-100000@wopr.campus.luth.se>
1997-05-22 20:40 ` Richard Henderson [this message]
1997-05-22 22:20   ` LKMs and installing syscalls on Linux/alpha 2.0.27 (resend) Andreas Johansson
1997-05-23 12:14   ` Andreas Johansson
     [not found] <Pine.LNX.3.95L01at.970523001215.15876A-100000@wopr.campus.luth.se>
1997-05-23  3:54 ` Richard Henderson
     [not found] <sjmzptnuvu2.fsf@incommunicado.ihtfp.org>
1997-05-22 20:12 ` Andreas Johansson
1997-05-22 19:53 Derek Atkins
  -- strict thread matches above, loose matches on Subject: below --
1997-05-21 22:45 Derek Atkins
1997-05-22 15:57 ` Andreas Johansson
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