Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Kip Walker" <kwalker@broadcom.com>
To: linux-mips@linux-mips.org
Subject: unaligned exception handling
Date: Mon, 30 Sep 2002 09:23:35 -0700	[thread overview]
Message-ID: <3D987A87.8B855D01@broadcom.com> (raw)

After inspecting a strange case in the mips64 kernel with address
errors, I'm starting to think there's a problem in the do_ade()
implementation.  I think the 32-bit kernel may have a similar problem,
but I haven't really inspected it.  The issue is where the kernel's
emulation of an address error causes another address error (NOT a page
fault).

Basically, I don't see how the exception table stuff in
emulate_load_store_insn is going to work.  Consider this scenario:

- user process does a 'sw' (for example) to an illegal address
  above xuseg but below xsseg
- do_ade calls emulate_load_store_insn, which tries swl/swr
- the swl again hits an illegal address, this time in the
  kernel's context
- do_ade does NOT check the exception table for the swl
- emulate_load_store_insn goes to the 'swl' part of the switch
- die_if_kernel DOES __die before the SIGBUS is delivered.

So I don't see how the ex_table stuff is useful at all.  Shouldn't
do_ade() do the exception table grovelling before calling
emulate_load_store_insn?

Kip

             reply	other threads:[~2002-09-30 16:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-30 16:23 Kip Walker [this message]
2002-10-01  7:38 ` unaligned exception handling Carsten Langgaard

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=3D987A87.8B855D01@broadcom.com \
    --to=kwalker@broadcom.com \
    --cc=linux-mips@linux-mips.org \
    /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