From: Segher Boessenkool <segher@kernel.crashing.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "open list:HARDWARE RANDOM NUMBER GENERATOR CORE"
<linux-crypto@vger.kernel.org>,
kbuild test robot <fengguang.wu@intel.com>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [cryptodev:master 130/134] aes_generic.c:undefined reference to `_restgpr_31_x'
Date: Fri, 12 Jan 2018 15:41:11 -0600 [thread overview]
Message-ID: <20180112214111.GQ21977@gate.crashing.org> (raw)
In-Reply-To: <CAK8P3a2YVVseBFNoDbwOtqR3-JHFuZ-WZD6-PzztNTO_X_soaw@mail.gmail.com>
On Fri, Jan 12, 2018 at 10:29:01PM +0100, Arnd Bergmann wrote:
> On Fri, Jan 12, 2018 at 9:41 PM, Segher Boessenkool
> <segher@kernel.crashing.org> wrote:
> > On Fri, Jan 12, 2018 at 08:43:21PM +0100, Arnd Bergmann wrote:
> >> On Fri, Jan 12, 2018 at 5:39 PM, Segher Boessenkool
>
> >> We could theoretically work around it by turning that into
> >> "#if defined(CONFIG_CC_OPTIMIZE_FOR_SIZE) ||
> >> defined(CONFIG_CRYPTO_AES)", but that seems rather ugly.
> >>
> >> My earlier patch already tried to be more specific, turning very
> >> specific optimizations off rather than moving from -O2 to -Os,
> >> but that turned out to lead to significantly worse performance,
> >> where -Os improved performance slightly. Is there a way
> >> to ask powerpc compilers to use mostly -Os but not the
> >> specific thing that makes it link to _restgpr_31_x?
> >
> > There is no such thing, sorry. Would be very hard to implement, and
> > older compilers will never get it, so it won't help you anyway :-(
>
> We use -Os only for gcc-7.1 and higher, where it produces faster
> code for AES and avoids running into
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83356
>
> > Maybe for now just enable it in crtsavres.S always, with a comment?
> > That -Os workaround is hopefully not going to live long either...
>
> It depends on whether or how soon someone comes up with a
> better fix for PR83356.
> gcc-8.0.0 is currently not affected by it, so we could limit the
> workaround (and the hack in crtsavres.S) to gcc-7-only.
I guess you could enable the _x routines whenever you use ubsan? Ubsan
will cause much bigger code growth than the handful of insns in those
routines?
Segher
next prev parent reply other threads:[~2018-01-12 21:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201801122249.RHvvGQJ6%fengguang.wu@intel.com>
2018-01-12 14:55 ` [cryptodev:master 130/134] aes_generic.c:undefined reference to `_restgpr_31_x' Arnd Bergmann
2018-01-12 16:39 ` Segher Boessenkool
2018-01-12 19:43 ` Arnd Bergmann
2018-01-12 20:41 ` Segher Boessenkool
2018-01-12 21:29 ` Arnd Bergmann
2018-01-12 21:41 ` Segher Boessenkool [this message]
2018-01-12 21:45 ` Arnd Bergmann
2018-01-12 22:10 ` Segher Boessenkool
2018-01-14 21:40 ` Arnd Bergmann
2018-01-15 0:21 ` Segher Boessenkool
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=20180112214111.GQ21977@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=arnd@arndb.de \
--cc=fengguang.wu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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).