linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: David Laight <David.Laight@ACULAB.COM>
Cc: 'Paul Burton' <paulburton@kernel.org>,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH] MIPS: Use __copy_{to,from}_user() for emulated FP loads/stores
Date: Thu, 26 Dec 2019 03:01:06 +0000 (GMT)	[thread overview]
Message-ID: <alpine.LFD.2.21.1912260251520.3762799@eddie.linux-mips.org> (raw)
In-Reply-To: <e220ba9a19da41abba599b5873afa494@AcuMS.aculab.com>

On Wed, 4 Dec 2019, David Laight wrote:

> > We used to have separate get_user_unaligned() & put_user_unaligned()
> > which would suggest that it's expected that get_user() & put_user()
> > require their accesses be aligned, but they were removed by commit
> > 3170d8d226c2 ("kill {__,}{get,put}_user_unaligned()") in v4.13.
> > 
> > But perhaps we should just take the second AdEL exception & recover via
> > the fixups table. We definitely don't right now... Needs further
> > investigation...
> 
> get/put_user can fault because the user page is absent (etc).
> So there must be code to 'expect' a fault on those instructions.

 As I recall we only emulate unaligned accesses with a subset of integer 
load/store instructions (and then only if TIF_FIXADE is set, which is the 
default), and never with FP load/store instructions.  Consequently I see 
no point in doing this in the FP emulator either and I think these ought 
to just send SIGBUS instead.  Otherwise you'll end up with user code that 
works differently depending on whether the FP hardware is real or 
emulated, which is really bad.

 FWIW,

  Maciej

  reply	other threads:[~2019-12-26  3:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03 20:49 [PATCH] MIPS: Use __copy_{to,from}_user() for emulated FP loads/stores Paul Burton
2019-12-04 11:14 ` David Laight
2019-12-04 15:40   ` Paul Burton
2019-12-04 16:18     ` David Laight
2019-12-26  3:01       ` Maciej W. Rozycki [this message]
2019-12-29 19:01         ` Paul Burton
2020-01-14  5:39           ` 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=alpine.LFD.2.21.1912260251520.3762799@eddie.linux-mips.org \
    --to=macro@linux-mips.org \
    --cc=David.Laight@ACULAB.COM \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=paulburton@kernel.org \
    --cc=stable@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).