Received: by 10.223.148.5 with SMTP id 5csp5995808wrq; Wed, 17 Jan 2018 08:12:46 -0800 (PST) X-Google-Smtp-Source: ACJfBosjGQ/jmd0MB4DOYdB40qgms5Wyw4l/UCezboDw7xtdRvAs8K3+KV/5oAXcEKJKwmOyCscE X-Received: by 10.99.168.76 with SMTP id i12mr12723015pgp.119.1516205566759; Wed, 17 Jan 2018 08:12:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516205566; cv=none; d=google.com; s=arc-20160816; b=siaA5gqsAA0YiQlhvRxyGmrrWr5ML5EckwAJoYi90Pihl0P+CjQSgLgLPBm2CmDCj/ QkDGRRRLRv2Cn91kYN46KtkSyFExQqwZFX+MC/i0pVI4+r7fJbYVRpHzOmsm+TchuW// wCnZ44Bo7sdn2/nrLD8U7J3961GBjtsSnpCr+imVu2a+W15EICbTi8TuAiwfK6y0yRKb u8WE0QW0TLKpX/rDNjndbew1QaQmI70+y+QTaeMeYhjbHGN5TvSJsuUKWbM3tvDQpsoo tAWNB+dl5fVoRzFY9Pc9OGU7x+iJvHKrMoLlRT/sD4E1b62R6UP6vv9XjZxbXnd74OBl 2HAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=E1QZtPLp6zWrrrQ81EzVLrS+GNA/Fmmf6sysazPGeLw=; b=t9A7wvcE77bLpB4v5Mh6tTB1rg/qtzF1a+hcr0Dgg/PuQRo2oJKwHuvNRfU7stbxm8 VP8Qf1if8ZiTwf8ISYwHC1BHu7IG2ySWCn4fPD2eoWvhejZTwTCYjgC9meFua7DWgQoq QqaI0rMSppTJ95p7Nbt6a5cdaRbnr+fGlmRm++Ey0bjVk1A0naE9U9WcGfapdp9cqI0c mvtoB8qFevETxwY8ThUtCXz3rUB6U8N6r7uBQLJed9mBI0/b7Qlp2pTfwlTkMNmy+4yA tGImDFlbRQkuKgY9zvZ3+Y9wIfBYpoPO8a5sOBz39rc36Pqg+favLd4WyOgYrrohJPDY 0KDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d123si4583513pfg.70.2018.01.17.08.12.31; Wed, 17 Jan 2018 08:12:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753671AbeAQQME (ORCPT + 99 others); Wed, 17 Jan 2018 11:12:04 -0500 Received: from foss.arm.com ([217.140.101.70]:43026 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753168AbeAQQMC (ORCPT ); Wed, 17 Jan 2018 11:12:02 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0B66280D; Wed, 17 Jan 2018 08:12:02 -0800 (PST) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5C24D3F557; Wed, 17 Jan 2018 08:11:59 -0800 (PST) Date: Wed, 17 Jan 2018 16:11:56 +0000 From: Dave Martin To: Russell King - ARM Linux Cc: linux-arch@vger.kernel.org, Arnd Bergmann , Nicolas Pitre , Tony Lindgren , Catalin Marinas , Tyler Baicar , Will Deacon , linux-kernel@vger.kernel.org, Oleg Nesterov , James Morse , "Eric W. Biederman" , Olof Johansson , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, Al Viro Subject: Re: [PATCH 07/11] signal/arm64: Document conflicts with SI_USER and SIGFPE, SIGTRAP, SIGBUS Message-ID: <20180117161156.GH22781@e103592.cambridge.arm.com> References: <20180112005940.23279-7-ebiederm@xmission.com> <20180115163028.GU22781@e103592.cambridge.arm.com> <87h8rnox3c.fsf@xmission.com> <20180116172407.GA22781@e103592.cambridge.arm.com> <871sipl9p9.fsf@xmission.com> <20180117115708.GM17719@n2100.armlinux.org.uk> <20180117121505.GD22781@e103592.cambridge.arm.com> <20180117123752.GN17719@n2100.armlinux.org.uk> <20180117153731.GG22781@e103592.cambridge.arm.com> <20180117154959.GP17719@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180117154959.GP17719@n2100.armlinux.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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