Re: [PATCH] crypto: aegis: fix badly optimized clang output

From: Arnd Bergmann
Date: Thu Jul 18 2019 - 17:35:18 EST


On Thu, Jul 18, 2019 at 11:17 PM 'Nick Desaulniers' via Clang Built
Linux <clang-built-linux@xxxxxxxxxxxxxxxx> wrote:
> On Thu, Jul 18, 2019 at 6:50 AM Arnd Bergmann <arnd@xxxxxxxx> wrote:
> > diff --git a/crypto/aegis.h b/crypto/aegis.h
> > index 41a3090cda8e..efed7251c49d 100644
> > --- a/crypto/aegis.h
> > +++ b/crypto/aegis.h
> > @@ -34,21 +34,21 @@ static const union aegis_block crypto_aegis_const[2] = {
> > } },
> > };
> >
> > -static void crypto_aegis_block_xor(union aegis_block *dst,
> > +static __always_inline void crypto_aegis_block_xor(union aegis_block *dst,
>
> `static inline` would be more concise and expand to the same
> attribute, IIRC. Not sure if that's worth sending a v2. But for now,

I think I tried that first but it had no effect when CONFIG_OPTIMIZE_INLINING
is set, as the compiler can sometimes ignores a plain 'inline'. The version
I posted was needed to pass the randconfig tests.

> Acked-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
>
Thanks,

Arnd