[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180117161156.GH22781@e103592.cambridge.arm.com>
Date: Wed, 17 Jan 2018 16:11:56 +0000
From: Dave Martin <Dave.Martin@....com>
To: Russell King - ARM Linux <linux@...linux.org.uk>
Cc: linux-arch@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Nicolas Pitre <nico@...aro.org>,
Tony Lindgren <tony@...mide.com>,
Catalin Marinas <catalin.marinas@....com>,
Tyler Baicar <tbaicar@...eaurora.org>,
Will Deacon <will.deacon@....com>,
linux-kernel@...r.kernel.org, Oleg Nesterov <oleg@...hat.com>,
James Morse <james.morse@....com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Olof Johansson <olof@...om.net>,
Santosh Shilimkar <santosh.shilimkar@...com>,
linux-arm-kernel@...ts.infradead.org,
Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH 07/11] signal/arm64: Document conflicts with SI_USER and
SIGFPE, SIGTRAP, SIGBUS
On Wed, Jan 17, 2018 at 03:49:59PM +0000, Russell King - ARM Linux wrote:
> On Wed, Jan 17, 2018 at 03:37:31PM +0000, Dave Martin wrote:
> > On Wed, Jan 17, 2018 at 12:37:52PM +0000, Russell King - ARM Linux wrote:
[...]
> > > I'd be more inclined to agree with you if VFP exceptions were synchronous
> > > but they aren't.
> >
> > Hmmm, it looks like imprecise fp exception traps are disallowed from
> > ARMv8 onwards. I guess they made more sense when the FPU really was a
> > coprocessor, or at least semidetached from the integer core.
> >
> > I think force_sig_info() makes sense here if and only if the traps
> > are guaranteed to be precise, so we probably should use this on arm64.
> > Not arm though (alpha doesn't either, if I understand the code
> > correctly.)
> >
> > Does that make sense?
> >
> > Apparently, few recent cores (at least ARM's own ones) support fp
> > exception trapping anyway... 1176 may be the most recent.
>
> ... and that makes the feenableexcept() argument about "A program
> really wants to know" moot. It can enable the exceptions in the
> FPSCR but its never going to receive a SIGFPE on CPUs that don't
> do exception trapping.
Sort of. If the hardware doesn't support traps then those FP(S)CR
bits can't be set. feenableexcept() returns -1 if the requested
bits don't stick, but I'll bet there's software that doesn't bother
to check...
Relying on fp exception traps therefore isn't portable, but software
that does so can at least portably fail safe if it checks for the -1
return.
I'll cook up some RFC patches for arm64, then I could take a look at
arm is nobody else is working on it.
Cheers
---Dave
Powered by blists - more mailing lists