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: Re: linux-next: manual merge of the userns tree with the mips tree
Date: Tue, 08 Aug 2017 12:33:46 -0500 [thread overview]
Message-ID: <87wp6eezgl.fsf@xmission.com> (raw)
In-Reply-To: <20170808055822.GI3509@linux-mips.org> (Ralf Baechle's message of "Tue, 8 Aug 2017 07:58:22 +0200")
Ralf Baechle <ralf@linux-mips.org> writes:
> On Tue, Aug 08, 2017 at 03:10:04PM +1000, Stephen Rothwell wrote:
>
> (Maciej added to cc.)
>
>> Hi Eric,
>>
>> Today's linux-next merge of the userns tree got a conflict in:
>>
>> arch/mips/kernel/traps.c
>>
>> between commit:
>>
>> 260a789828aa ("MIPS: signal: Remove unreachable code from force_fcr31_sig().")
>>
>> from the mips tree and commit:
>>
>> ea1b75cf9138 ("signal/mips: Document a conflict with SI_USER with SIGFPE")
>>
>> from the userns tree.
>>
>> I fixed it up (the former removed the code updated by the latter) and
>> can carry the fix as necessary. This is now fixed as far as linux-next
>> is concerned, but any non trivial conflicts should be mentioned to your
>> upstream maintainer when your tree is submitted for merging. You may
>> also want to consider cooperating with the maintainer of the conflicting
>> tree to minimise any particularly complex conflicts.
>
> Eric,
>
> after yesterday's emails on the topic I think commit ea1b75cf9138 ("signal/
> mips: Document a conflict with SI_USER with SIGFPE") should be
> dropped.
I have a follow on change I am about to post and would like to carry
that replaces force_sig_info with force_sig_fault. So force_fcr31_sig
winds up looking like:
void force_fcr31_sig(unsigned long fcr31, void __user *fault_addr,
struct task_struct *tsk)
{
int si_code;
if (fcr31 & FPU_CSR_INV_X)
si_code = FPE_FLTINV;
else if (fcr31 & FPU_CSR_DIV_X)
si_code = FPE_FLTDIV;
else if (fcr31 & FPU_CSR_OVF_X)
si_code = FPE_FLTOVF;
else if (fcr31 & FPU_CSR_UDF_X)
si_code = FPE_FLTUND;
else if (fcr31 & FPU_CSR_INE_X)
si_code = FPE_FLTRES;
else
si_code = FPE_FIXME;
force_sig_fault(SIGFPE, si_code, fault_addr, tsk);
}
Which causes gcc to complain if the last else clause is dropped.
Would you be happy if the function wound up looking like:
void force_fcr31_sig(unsigned long fcr31, void __user *fault_addr,
struct task_struct *tsk)
{
int si_code;
if (fcr31 & FPU_CSR_INV_X)
si_code = FPE_FLTINV;
else if (fcr31 & FPU_CSR_DIV_X)
si_code = FPE_FLTDIV;
else if (fcr31 & FPU_CSR_OVF_X)
si_code = FPE_FLTOVF;
else if (fcr31 & FPU_CSR_UDF_X)
si_code = FPE_FLTUND;
else if (fcr31 & FPU_CSR_INE_X)
si_code = FPE_FLTRES;
else
return; /* Broken hardware? */
force_sig_fault(SIGFPE, si_code, fault_addr, tsk);
}
As it is now clear that code path should never happen I will be happy to
queue change that effectively reverts of ea1b75cf9138 ("signal/mips:
Document a conflict with SI_USER with SIGFPE") and just returns from
force_fcr32_sig in that case.
Eric
next prev parent reply other threads:[~2017-08-08 17:42 UTC|newest]
Thread overview: 6+ 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 [this message]
2017-08-08 19:07 ` [PATCH] mips/signal: In force_fcr31_sig return in the impossible case Eric W. Biederman
2017-09-05 0:22 ` linux-next: manual merge of the userns tree with the mips tree Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2014-01-23 4:13 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=87wp6eezgl.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).