Thread (5 messages) 5 messages, 3 authors, 2020-12-04

Re: [PATCH] crypto: aegis128 - avoid spurious references crypto_aegis128_update_simd

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2020-11-30 13:10:36

Hi Ard,

On Mon, Nov 30, 2020 at 1:47 PM Ard Biesheuvel [off-list ref] wrote:
On Mon, 30 Nov 2020 at 13:42, Geert Uytterhoeven [off-list ref] wrote:
quoted
On Mon, Nov 30, 2020 at 1:26 PM Ard Biesheuvel [off-list ref] wrote:
quoted
Geert reports that builds where CONFIG_CRYPTO_AEGIS128_SIMD is not set
may still emit references to crypto_aegis128_update_simd(), which
cannot be satisfied and therefore break the build. These references
only exist in functions that can be optimized away, but apparently,
the compiler is not always able to prove this.
The code is not unreachable. Both crypto_aegis128_encrypt_simd() and
crypto_aegis128_decrypt_simd() call crypto_aegis128_process_ad(..., true);
Those functions themselves can be optimized away too, as well as
struct aead_alg crypto_aegis128_alg_simd, which is the only thing that
refers to those functions, and is itself only referenced inside a 'if
(IS_ENABLED(CONFIG_CRYPTO_AEGIS128_SIMD))' conditional block. This is
why it works fine most of the time.
I stand corrected: I missed the conditional registration of
crypto_aegis128_alg_simd.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help