btrfs-progs/crypto
Tino Mai 0da635fd1b btrfs-progs: crypto: fix SSE2/SSE4.1 detection of BLAKE2
On recent x86-64 system with march=native|<cpu>|<microarchitecture
level> gcc/clang will automatically define all the available vector
extensions macros. crypto/blake2-config.h then correctly set all the
HAVE_<EXTENSION> macros.

crypto/blake2-round.h then checks the HAVE_<EXTENSION> macros for
including further headers:

    #if defined(HAVE_SSE41)
    #include "blake2b-load-sse41.h"
    #else
    #include "blake2b-load-sse2.h"
    #endif

which is wrong. On recent systems it always results in including
blake2b-load-sse41.h. crypto/blake2-round.h itself is included by
crypto/blake2b-sse2.c and now we have a SSE2/SSE4.1 code mixing
resulting in the incompatible type for argument build errors described
in #589.

The idea is to remove the lines above from crypto/blake2-round.h and put
the includes directly into crypto/blake2b-sse2.c and
crypto/blake2b-sse41.c respectively.

Note this slightly diverges from the upstream BLAKE2 sources.

Pull-request: #591
Author: Tino Mai <mai.tino@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-03-07 20:50:06 +01:00
..
blake2-config.h btrfs-progs: crypto: add AVX2 implementation of BLAKE2 2023-02-28 19:49:29 +01:00
blake2-impl.h btrfs-progs: add blake2b reference implementation 2019-11-18 19:21:05 +01:00
blake2.h btrfs-progs: crypto: call blake2 implementations by pointer 2023-02-28 19:53:43 +01:00
blake2b-avx2.c btrfs-progs: crypto: add AVX2 implementation of BLAKE2 2023-02-28 19:49:29 +01:00
blake2b-load-avx2-simple.h btrfs-progs: crypto: add AVX2 implementation of BLAKE2 2023-02-28 19:49:29 +01:00
blake2b-load-avx2.h btrfs-progs: crypto: add AVX2 implementation of BLAKE2 2023-02-28 19:49:29 +01:00
blake2b-load-sse2.h btrfs-progs: crypto: add SSE2 implementation of BLAKE2 2023-02-28 19:48:24 +01:00
blake2b-load-sse41.h btrfs-progs: crypto: add SSE4.1 implementation of BLAKE2 2023-02-28 19:49:06 +01:00
blake2b-ref.c btrfs-progs: fix detection of accelerated implementation. 2023-03-01 15:10:21 +01:00
blake2b-round.h btrfs-progs: crypto: fix SSE2/SSE4.1 detection of BLAKE2 2023-03-07 20:50:06 +01:00
blake2b-sse2.c btrfs-progs: crypto: fix SSE2/SSE4.1 detection of BLAKE2 2023-03-07 20:50:06 +01:00
blake2b-sse41.c btrfs-progs: crypto: fix SSE2/SSE4.1 detection of BLAKE2 2023-03-07 20:50:06 +01:00
crc32c.c btrfs-progs: crypto: use common CPU feature detection for crc32c 2023-02-28 20:11:22 +01:00
crc32c.h btrfs-progs: crypto: use common CPU feature detection for crc32c 2023-02-28 20:11:22 +01:00
hash-speedtest.c btrfs-progs: hash-speedtest: benchmark the configured backend 2023-03-01 15:53:26 +01:00
hash-vectest.c btrfs-progs: hash-vectest: verify vectors against configured implementation 2023-03-01 15:53:26 +01:00
hash.c btrfs-progs: fix detection of accelerated implementation. 2023-03-01 15:10:21 +01:00
hash.h btrfs-progs: fix detection of accelerated implementation. 2023-03-01 15:10:21 +01:00
sha-private.h
sha.h btrfs-progs: crypto: call sha256 implementations by pointer 2023-02-28 20:10:58 +01:00
sha224-256.c btrfs-progs: fix detection of accelerated implementation. 2023-03-01 15:10:21 +01:00
sha256-x86.c btrfs-progs: crypto: add accelerated SHA256 implementation 2023-02-28 19:49:30 +01:00
xxhash.c btrfs-progs: crypto: update xxhash 2023-02-28 19:49:31 +01:00
xxhash.h btrfs-progs: crypto: update xxhash 2023-02-28 19:49:31 +01:00