From patchwork Fri Apr 20 01:04:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Eric W. Biederman" X-Patchwork-Id: 901588 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40RybQ75PPz9s1t for ; Fri, 20 Apr 2018 11:15:46 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xmission.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40RybQ5rY0zF25G for ; Fri, 20 Apr 2018 11:15:46 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=xmission.com X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=xmission.com (client-ip=166.70.13.233; helo=out03.mta.xmission.com; envelope-from=ebiederm@xmission.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=xmission.com Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40RyWH1p24zF1sY for ; Fri, 20 Apr 2018 11:12:11 +1000 (AEST) Received: from in01.mta.xmission.com ([166.70.13.51]) by out03.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1f9Kau-0007D4-Fs; Thu, 19 Apr 2018 19:12:08 -0600 Received: from [97.119.174.25] (helo=x220.int.ebiederm.org) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1f9KXE-00014u-Dj; Thu, 19 Apr 2018 19:08:21 -0600 From: "Eric W. Biederman" To: linux-arch@vger.kernel.org Date: Thu, 19 Apr 2018 20:04:04 -0500 Message-Id: <20180420010408.24438-13-ebiederm@xmission.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <878t9ilmhv.fsf@xmission.com> References: <878t9ilmhv.fsf@xmission.com> X-XM-SPF: eid=1f9KXE-00014u-Dj; ; ; mid=<20180420010408.24438-13-ebiederm@xmission.com>; ; ; hst=in01.mta.xmission.com; ; ; ip=97.119.174.25; ; ; frm=ebiederm@xmission.com; ; ; spf=neutral X-XM-AID: U2FsdGVkX1+wcIh/BhNB0MFkZltxNsXEEhiWF+UgdDM= X-SA-Exim-Connect-IP: 97.119.174.25 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa04.xmission.com X-Spam-Level: *** X-Spam-Status: No, score=3.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE, TR_Symld_Words, T_TM2_M_HEADER_IN_MSG, T_TooManySym_01, XMNoVowels,XMSubLong autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.7 XMSubLong Long Subject * 1.5 TR_Symld_Words too many words that have symbols inside * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa04 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa04 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ***;linux-arch@vger.kernel.org X-Spam-Relay-Country: X-Spam-Timing: total 1104 ms - load_scoreonly_sql: 0.13 (0.0%), signal_user_changed: 4.9 (0.4%), b_tie_ro: 3.1 (0.3%), parse: 1.69 (0.2%), extract_message_metadata: 39 (3.5%), get_uri_detail_list: 3.9 (0.3%), tests_pri_-1000: 17 (1.6%), tests_pri_-950: 1.68 (0.2%), tests_pri_-900: 1.24 (0.1%), tests_pri_-400: 27 (2.4%), check_bayes: 26 (2.3%), b_tokenize: 10 (0.9%), b_tok_get_all: 8 (0.7%), b_comp_prob: 2.4 (0.2%), b_tok_touch_all: 3.7 (0.3%), b_finish: 0.73 (0.1%), tests_pri_0: 186 (16.8%), check_dkim_signature: 0.61 (0.1%), check_dkim_adsp: 4.3 (0.4%), tests_pri_500: 821 (74.4%), poll_dns_idle: 808 (73.2%), rewrite_mail: 0.00 (0.0%) Subject: [REVIEW][PATCH 13/17] signal/powerpc: Replace FPE_FIXME with FPE_FLTUNK X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kumar Gala , linux-kernel@vger.kernel.org, Paul Mackerras , "Eric W. Biederman" , linux-api@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Using an si_code of 0 that aliases with SI_USER is clearly the wrong thing todo, and causes problems in interesting ways. The newly defined FPE_FLTUNK semantically appears to fit the bill so use it instead. Cc: Paul Mackerras Cc: Kumar Gala Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org Fixes: 9bad068c24d7 ("[PATCH] ppc32: support for e500 and 85xx") Fixes: 0ed70f6105ef ("PPC32: Provide proper siginfo information on various exceptions.") History Tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git Signed-off-by: "Eric W. Biederman" --- arch/powerpc/include/uapi/asm/siginfo.h | 7 ------- arch/powerpc/kernel/traps.c | 6 +++--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/include/uapi/asm/siginfo.h b/arch/powerpc/include/uapi/asm/siginfo.h index 9f142451a01f..0437afc9ef3c 100644 --- a/arch/powerpc/include/uapi/asm/siginfo.h +++ b/arch/powerpc/include/uapi/asm/siginfo.h @@ -15,13 +15,6 @@ #include -/* - * SIGFPE si_codes - */ -#ifdef __KERNEL__ -#define FPE_FIXME 0 /* Broken dup of SI_USER */ -#endif /* __KERNEL__ */ - /* * SIGTRAP si_codes */ diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 087855caf6a9..fdf9400beec8 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -1031,7 +1031,7 @@ static void emulate_single_step(struct pt_regs *regs) static inline int __parse_fpscr(unsigned long fpscr) { - int ret = FPE_FIXME; + int ret = FPE_FLTUNK; /* Invalid operation */ if ((fpscr & FPSCR_VE) && (fpscr & FPSCR_VX)) @@ -1972,7 +1972,7 @@ void SPEFloatingPointException(struct pt_regs *regs) extern int do_spe_mathemu(struct pt_regs *regs); unsigned long spefscr; int fpexc_mode; - int code = FPE_FIXME; + int code = FPE_FLTUNK; int err; flush_spe_to_thread(current); @@ -2041,7 +2041,7 @@ void SPEFloatingPointRoundException(struct pt_regs *regs) printk(KERN_ERR "unrecognized spe instruction " "in %s at %lx\n", current->comm, regs->nip); } else { - _exception(SIGFPE, regs, FPE_FIXME, regs->nip); + _exception(SIGFPE, regs, FPE_FLTUNK, regs->nip); return; } }