From: James Hogan <jhogan@kernel.org>
To: "Maciej W. Rozycki" <macro@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] MIPS: prctl: Disallow FRE without FR with PR_SET_FP_MODE requests
Date: Thu, 31 May 2018 22:29:57 +0100 [thread overview]
Message-ID: <20180531212956.GA30406@jamesdev> (raw)
In-Reply-To: <alpine.DEB.2.00.1805141439290.10896@tp.orcam.me.uk>
[-- Attachment #1: Type: text/plain, Size: 1632 bytes --]
On Tue, May 15, 2018 at 11:04:44PM +0100, Maciej W. Rozycki wrote:
> Having PR_FP_MODE_FRE (i.e. Config5.FRE) set without PR_FP_MODE_FR (i.e.
> Status.FR) is not supported as the lone purpose of Config5.FRE is to
> emulate Status.FR=0 handling on FPU hardware that has Status.FR=1
> hardwired[1][2]. Also we do not handle this case elsewhere, and assume
> throughout our code that TIF_HYBRID_FPREGS and TIF_32BIT_FPREGS cannot
> be set both at once for a task, leading to inconsistent behaviour if
> this does happen.
>
> Return unsuccessfully then from prctl(2) PR_SET_FP_MODE calls requesting
> PR_FP_MODE_FRE to be set with PR_FP_MODE_FR clear. This corresponds to
> modes allowed by `mips_set_personality_fp'.
>
> References:
>
> [1] "MIPS Architecture For Programmers, Vol. III: MIPS32 / microMIPS32
> Privileged Resource Architecture", Imagination Technologies,
> Document Number: MD00090, Revision 6.02, July 10, 2015, Table 9.69
> "Config5 Register Field Descriptions", p. 262
>
> [2] "MIPS Architecture For Programmers, Volume III: MIPS64 / microMIPS64
> Privileged Resource Architecture", Imagination Technologies,
> Document Number: MD00091, Revision 6.03, December 22, 2015, Table
> 9.72 "Config5 Register Field Descriptions", p. 288
>
> Cc: stable@vger.kernel.org # 4.0+
> Fixes: 9791554b45a2 ("MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS")
> Signed-off-by: Maciej W. Rozycki <macro@mips.com>
Thanks, applied to mips-fixes, hopefully for 4.17 (but if it misses
tomorrows linux-next it may have to wait 'til 4.18).
Cheers
James
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2018-05-31 21:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 22:04 [PATCH] MIPS: prctl: Disallow FRE without FR with PR_SET_FP_MODE requests Maciej W. Rozycki
2018-05-15 22:04 ` Maciej W. Rozycki
2018-05-24 16:36 ` Paul Burton
2018-05-24 16:36 ` Paul Burton
2018-05-24 17:06 ` Maciej W. Rozycki
2018-05-24 17:06 ` Maciej W. Rozycki
2018-05-31 21:29 ` James Hogan [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=20180531212956.GA30406@jamesdev \
--to=jhogan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=macro@mips.com \
--cc=ralf@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.