From: Pete Popov <ppopov@mvista.com>
To: Florian Lohoff <flo@rfc822.org>
Cc: Ralf Baechle <ralf@oss.sgi.com>, linux-mips@oss.sgi.com
Subject: Re: Illegal instruction - a workaround or fix ?
Date: Fri, 20 Apr 2001 12:05:03 -0700 [thread overview]
Message-ID: <3AE0885F.D1A3D26@mvista.com> (raw)
In-Reply-To: 20010312144131.C7715@paradigm.rfc822.org
Florian Lohoff wrote:
>
> On Mon, Mar 12, 2001 at 12:21:34PM +0100, Ralf Baechle wrote:
> > 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.
>
> As mentioned on IRC - This "Oopses" for me ...
I'm bringing this up again because none of the related patches on this
topic have been applied to the latest cvs kernel. The patch Florian
refers to above oopses for me as well. This patch below, from Florian,
but updated against the latest cvs kernel, works (at least the few
simple tests I've run do work now).
--- arch/mips/kernel/sysmips.c.old Fri Apr 20 11:58:38 2001
+++ arch/mips/kernel/sysmips.c Fri Apr 20 11:59:59 2001
@@ -99,7 +99,7 @@
".word\t1b, 3b\n\t"
".word\t2b, 3b\n\t"
".previous\n\t"
- : "=&r" (tmp), "=o" (* (u32 *) p), "=r" (errno)
+ : "=&r" (retval), "=o" (* (u32 *) p), "=r"
(errno)
: "r" (arg2), "o" (* (u32 *) p), "2" (errno)
: "$1");
@@ -110,14 +110,7 @@
if (current->ptrace & PT_TRACESYS)
syscall_trace();
- ((struct pt_regs *)&cmd)->regs[2] = tmp;
- ((struct pt_regs *)&cmd)->regs[7] = 0;
-
- __asm__ __volatile__(
- "move\t$29, %0\n\t"
- "j\to32_ret_from_sys_call"
- : /* No outputs */
- : "r" (&cmd));
+ goto out;
/* Unreached */
#else
printk("sys_sysmips(MIPS_ATOMIC_SET, ...) not ready for
!CONFIG_CPU_HAS_LLSC\n");
next prev parent reply other threads:[~2001-04-20 19:07 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
2001-03-12 13:41 ` Florian Lohoff
2001-04-20 19:05 ` Pete Popov [this message]
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=3AE0885F.D1A3D26@mvista.com \
--to=ppopov@mvista.com \
--cc=flo@rfc822.org \
--cc=linux-mips@oss.sgi.com \
--cc=ralf@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