From: Ralf Baechle <ralf@oss.sgi.com>
To: Florian Lohoff <flo@rfc822.org>
Cc: linux-mips@oss.sgi.com
Subject: Re: Illegal instruction - a workaround or fix ?
Date: Mon, 12 Mar 2001 12:21:34 +0100 [thread overview]
Message-ID: <20010312122134.B1235@bacchus.dhis.org> (raw)
In-Reply-To: <20010311191639.A8587@paradigm.rfc822.org>; from flo@rfc822.org on Sun, Mar 11, 2001 at 07:16:39PM +0100
Thanks, that was the hint I needed. o32_ret_from_sys_call expects the
content of s-registers to be unchanged from userspace but sys_sysmips
clobbers them.
Below a patch from the famous ``Smoke This, It's Good For You (TM)''
series. Lemme know if it helps.
Ralf
--- arch/mips/kernel/sysmips.c 2001/02/09 21:05:46 1.17
+++ arch/mips/kernel/sysmips.c 2001/03/12 11:12:20
@@ -19,6 +19,7 @@
#include <asm/cachectl.h>
#include <asm/pgalloc.h>
+#include <asm/stackframe.h>
#include <asm/sysmips.h>
#include <asm/uaccess.h>
@@ -47,8 +48,9 @@
return address;
}
-asmlinkage int
-sys_sysmips(int cmd, int arg1, int arg2, int arg3)
+save_static_function(sys_sysmips);
+static_unused int
+_sys_sysmips(int cmd, int arg1, int arg2, int arg3)
{
int *p;
char *name;
@@ -114,7 +116,7 @@
__asm__ __volatile__(
"move\t$29, %0\n\t"
- "j\to32_ret_from_sys_call"
+ "j\to32_ret_from_sys_call_restore_static"
: /* No outputs */
: "r" (&cmd));
/* Unreached */
--- arch/mips/kernel/scall_o32.S 2000/08/08 18:54:49 1.14
+++ arch/mips/kernel/scall_o32.S 2001/03/12 11:09:12
@@ -86,6 +86,10 @@
RESTORE_SOME
RESTORE_SP_AND_RET
+EXPORT(o32_ret_from_sys_call_restore_static)
+ RESTORE_STATIC
+ j o32_ret_from_sys_call
+
o32_handle_softirq:
jal do_softirq
b 9b
next prev parent reply other threads:[~2001-03-12 11:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-11 18:16 Illegal instruction - a workaround or fix ? Florian Lohoff
2001-03-12 11:21 ` Ralf Baechle [this message]
2001-03-12 13:41 ` Florian Lohoff
2001-04-20 19:05 ` Pete Popov
2001-04-20 19:18 ` Ralf Baechle
2001-04-20 19:19 ` Pete Popov
2001-04-20 19:48 ` Florian Lohoff
2001-04-20 19:58 ` Florian Lohoff
2001-04-30 9:34 ` Maciej W. Rozycki
2001-04-30 20:24 ` Ralf Baechle
2001-05-02 13:21 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010312122134.B1235@bacchus.dhis.org \
--to=ralf@oss.sgi.com \
--cc=flo@rfc822.org \
--cc=linux-mips@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox