linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: Unaligned kernel access for __udivsi3_i4i
Date: Sat, 20 Feb 2010 12:17:14 +0000	[thread overview]
Message-ID: <20100220121713.GA27558@linux-sh.org> (raw)
In-Reply-To: <5ec3d7931002191551g21c0cda9le17729529b1afd78@mail.gmail.com>

On Sat, Feb 20, 2010 at 11:47:16AM +0000, Matt Fleming wrote:
> On Sat, Feb 20, 2010 at 01:24:38AM +0100, Drasko DRASKOVIC wrote:
> > Does that mean that we can do division by zero that goes completely
> > unnoticed, unless we turn up the warnings (as kernel will fix these
> > unalignments without even reporting it)?
> 
> Unfortunately, yes.
> 
There are two sides to consider. Division by zero is generally an FPU
exception and you can instrument the FPU error exception handlers
accordingly for the cases where userspace is responsible. For the
__udivsi3_i4i case this will just result in an address error being raised
given that it's wholly integer based. The regular __udivsi3_i4 case on
the other hand will have a different exception path due to being FPU
bounded, assuming you haven't disabled FPU code for your userspace
applications.

      parent reply	other threads:[~2010-02-20 12:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-19 23:51 Unaligned kernel access for __udivsi3_i4i Drasko DRASKOVIC
2010-02-20  0:08 ` Matt Fleming
2010-02-20  0:24 ` Drasko DRASKOVIC
2010-02-20 11:47 ` Matt Fleming
2010-02-20 12:17 ` Paul Mundt [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=20100220121713.GA27558@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-sh@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).