crypto: x86/aria - do not use magic number offsets of aria_ctx
authorTaehee Yoo <ap420073@gmail.com>
Sun, 1 Jan 2023 09:12:50 +0000 (09:12 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 6 Jan 2023 09:15:47 +0000 (17:15 +0800)
commit35344cf30f2b080f75b4097eebcd7567e54bce22
tree19105b49700509825512761828e9eae2998598b7
parent8e7d7ce2e3947013a7b12452db42cb73021e13a0
crypto: x86/aria - do not use magic number offsets of aria_ctx

aria-avx assembly code accesses members of aria_ctx with magic number
offset. If the shape of struct aria_ctx is changed carelessly,
aria-avx will not work.
So, we need to ensure accessing members of aria_ctx with correct
offset values, not with magic numbers.

It adds ARIA_CTX_enc_key, ARIA_CTX_dec_key, and ARIA_CTX_rounds in the
asm-offsets.c So, correct offset definitions will be generated.
aria-avx assembly code can access members of aria_ctx safely with
these definitions.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/aria-aesni-avx-asm_64.S
arch/x86/kernel/asm-offsets.c
crypto/aria_generic.c