Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@oss.sgi.com>
To: Carsten Langgaard <carstenl@mips.com>
Cc: linux-mips@oss.sgi.com
Subject: Re: emulate_load_store_insn
Date: Sat, 9 Jun 2001 04:45:20 +0200	[thread overview]
Message-ID: <20010609044520.A12255@bacchus.dhis.org> (raw)
In-Reply-To: <200106090151.SAA11162@hubble.mips.com>; from carstenl@mips.com on Fri, Jun 08, 2001 at 06:51:01PM -0700

On Fri, Jun 08, 2001 at 06:51:01PM -0700, Carsten Langgaard wrote:

> Can anyone please explain the whole deal with the emulate_load_store_insn 
> function in arch/mips/kernel/unaligned.c.

Some software does of unaligned accesses.  Typical userspace example is fdisk
and the network stack which generally tries hard to avoid unaligned loads
and stores may make unaligned stores at times though.

> Isn't there a potential hole there, where a user application makes an illegal 
> memory access to an unaligned address and then the kernel tries to emulate
> that and crashes.

The addresses are verified the same way as any other userspace address
passed to the kernel.

> It also look like the MF_FIXADE flag is set by default, why is that ?

Two reasons 1) other MIPS OSes such as Risc/OS and IRIX also do it 2) crappy
software doesn't know how to enable this feature ...

> Shouldn't one suppose to make a syscall setting this MF_FIXADE flag ?

Sysmips(2) allows to toggle this flag.

  Ralf

      reply	other threads:[~2001-06-09  2:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-09  1:51 emulate_load_store_insn Carsten Langgaard
2001-06-09  2:45 ` Ralf Baechle [this message]

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=20010609044520.A12255@bacchus.dhis.org \
    --to=ralf@oss.sgi.com \
    --cc=carstenl@mips.com \
    --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