From: Lukas Wunner <lukas@wunner.de>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-mips@vger.kernel.org, Stefan Berger <stefanb@linux.ibm.com>,
linux-crypto@vger.kernel.org
Subject: Re: Mips handling of signed integer overflows
Date: Sun, 28 Jul 2024 18:26:19 +0200 [thread overview]
Message-ID: <ZqZxK0fWpVxemcuu@wunner.de> (raw)
In-Reply-To: <alpine.DEB.2.21.2407221532520.51207@angie.orcam.me.uk>
On Mon, Jul 22, 2024 at 03:59:00PM +0100, Maciej W. Rozycki wrote:
> On Mon, 22 Jul 2024, Lukas Wunner wrote:
> > I assume this means that the compiler uses non-trapping instructions
> > for addition/subtraction on Mips. Consequently, calling die_if_kernel()
> > from do_ov() in arch/mips/kernel/traps.c should no longer be necessary
> > as it can never happen.
> >
> > Can you confirm or deny this?
[...]
> MIPS C compilers have never produced trapping addition/subtraction
> instructions, which have been reserved for use by other programming
> languages. And GCC specifically has never produced these instructions for
> any of the languages supported, there are no patterns in the MIPS backend
> defined that would produce these instructions. The only way to encounter
> one of them in the execution stream is by means of handcoded assembly.
[...]
> Did I answer your question?
Yes thank you this helps greatly.
Lukas
prev parent reply other threads:[~2024-07-28 16:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-22 14:05 Mips handling of signed integer overflows Lukas Wunner
2024-07-22 14:59 ` Maciej W. Rozycki
2024-07-28 16:26 ` Lukas Wunner [this message]
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=ZqZxK0fWpVxemcuu@wunner.de \
--to=lukas@wunner.de \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=macro@orcam.me.uk \
--cc=stefanb@linux.ibm.com \
--cc=tsbogend@alpha.franken.de \
/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