Re: [PATCH v7] crypto: x86: Regularize glue function prototypes
From: Herbert Xu
Date: Wed Dec 11 2019 - 04:39:15 EST
On Tue, Nov 26, 2019 at 10:08:02PM -0800, Kees Cook wrote:
> The crypto glue performed function prototype casting via macros to make
> indirect calls to assembly routines. Instead of performing casts at the
> call sites (which trips Control Flow Integrity prototype checking), switch
> each prototype to a common standard set of arguments which allows the
> removal of the existing macros. In order to keep pointer math unchanged,
> internal casting between u128 pointers and u8 pointers is added.
>
> Co-developed-by: João Moreira <joao.moreira@xxxxxxxxx>
> Signed-off-by: João Moreira <joao.moreira@xxxxxxxxx>
> Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
> ---
> v7:
> - added João's SoB (ebiggers)
> - corrected aesni .S prototype comments (ebiggers)
> - collapsed glue series into a single patch (ebiggers)
> v6: https://lore.kernel.org/lkml/20191122010334.12081-1-keescook@xxxxxxxxxxxx
> v5: https://lore.kernel.org/lkml/20191113182516.13545-1-keescook@xxxxxxxxxxxx
> v4: https://lore.kernel.org/lkml/20191111214552.36717-1-keescook@xxxxxxxxxxxx
> v3: https://lore.kernel.org/lkml/20190507161321.34611-1-keescook@xxxxxxxxxxxx
> ---
> arch/x86/crypto/aesni-intel_asm.S | 8 +--
> arch/x86/crypto/aesni-intel_glue.c | 45 ++++++-------
> arch/x86/crypto/camellia_aesni_avx2_glue.c | 74 ++++++++++-----------
> arch/x86/crypto/camellia_aesni_avx_glue.c | 72 +++++++++------------
> arch/x86/crypto/camellia_glue.c | 45 +++++++------
> arch/x86/crypto/cast6_avx_glue.c | 68 +++++++++-----------
> arch/x86/crypto/glue_helper.c | 23 ++++---
> arch/x86/crypto/serpent_avx2_glue.c | 65 +++++++++----------
> arch/x86/crypto/serpent_avx_glue.c | 63 +++++++++---------
> arch/x86/crypto/serpent_sse2_glue.c | 30 +++++----
> arch/x86/crypto/twofish_avx_glue.c | 75 ++++++++++------------
> arch/x86/crypto/twofish_glue_3way.c | 37 ++++++-----
> arch/x86/include/asm/crypto/camellia.h | 63 +++++++++---------
> arch/x86/include/asm/crypto/glue_helper.h | 18 ++----
> arch/x86/include/asm/crypto/serpent-avx.h | 20 +++---
> arch/x86/include/asm/crypto/serpent-sse2.h | 28 ++++----
> arch/x86/include/asm/crypto/twofish.h | 19 +++---
> crypto/cast6_generic.c | 18 +++---
> crypto/serpent_generic.c | 6 +-
> include/crypto/cast6.h | 4 +-
> include/crypto/serpent.h | 4 +-
> include/crypto/xts.h | 2 -
> 22 files changed, 374 insertions(+), 413 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt