From: ebiederm@xmission.com (Eric W. Biederman)
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
James Hogan <james.hogan@imgtec.com>,
Linux-Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Maciej W. Rozycki" <macro@linux-mips.org>
Subject: [PATCH] mips/signal: In force_fcr31_sig return in the impossible case
Date: Tue, 08 Aug 2017 14:07:44 -0500 [thread overview]
Message-ID: <873791g9of.fsf_-_@xmission.com> (raw)
In-Reply-To: <87wp6eezgl.fsf@xmission.com> (Eric W. Biederman's message of "Tue, 08 Aug 2017 12:33:46 -0500")
In a recent discussion Maciej Rozycki reported that this case is
impossible.
Handle the impossible case by just returning instead of trying to
handle it. This makes static analysis simpler as it means nothing
needs to consider the impossible case after the return statement.
As the code no longer has to deal with this case remove FPE_FIXME from
the mips siginfo.h
Cc: "Maciej W. Rozycki" <macro@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Link: http://lkml.kernel.org/r/20170718140651.15973-4-ebiederm@xmission.com
Ref: ea1b75cf9138 ("signal/mips: Document a conflict with SI_USER with SIGFPE")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
arch/mips/include/uapi/asm/siginfo.h | 7 -------
arch/mips/kernel/traps.c | 2 +-
2 files changed, 1 insertion(+), 8 deletions(-)
Ralf, unless someone objects this is the patch I plan on merging into my
tree, and building up.
diff --git a/arch/mips/include/uapi/asm/siginfo.h b/arch/mips/include/uapi/asm/siginfo.h
index 22a86d84a504..cf6113bbcb98 100644
--- a/arch/mips/include/uapi/asm/siginfo.h
+++ b/arch/mips/include/uapi/asm/siginfo.h
@@ -123,11 +123,4 @@ typedef struct siginfo {
#define SI_TIMER -3 /* sent by timer expiration */
#define SI_MESGQ -4 /* sent by real time mesq state change */
-/*
- * SIGFPE si_codes
- */
-#ifdef __KERNEL__
-#define FPE_FIXME 0 /* Broken dup of SI_USER */
-#endif /* __KERNEL__ */
-
#endif /* _UAPI_ASM_SIGINFO_H */
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 6c9cca9c5341..2bf414993347 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -735,7 +735,7 @@ void force_fcr31_sig(unsigned long fcr31, void __user *fault_addr,
else if (fcr31 & FPU_CSR_INE_X)
si.si_code = FPE_FLTRES;
else
- si.si_code = FPE_FIXME;
+ return; /* Broken hardware? */
force_sig_info(SIGFPE, &si, tsk);
}
--
2.10.1
next prev parent reply other threads:[~2017-08-08 19:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 5:10 linux-next: manual merge of the userns tree with the mips tree Stephen Rothwell
2017-08-08 5:58 ` Ralf Baechle
2017-08-08 17:33 ` Eric W. Biederman
2017-08-08 19:07 ` Eric W. Biederman [this message]
2017-09-05 0:22 ` Stephen Rothwell
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=873791g9of.fsf_-_@xmission.com \
--to=ebiederm@xmission.com \
--cc=james.hogan@imgtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=sfr@canb.auug.org.au \
/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).