From: Dave Hansen <dave.hansen@intel.com>
To: "Elliott, Robert (Servers)" <elliott@hpe.com>,
Taehee Yoo <ap420073@gmail.com>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
"davem@davemloft.net" <davem@davemloft.net>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"bp@alien8.de" <bp@alien8.de>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"x86@kernel.org" <x86@kernel.org>,
"jussi.kivilinna@iki.fi" <jussi.kivilinna@iki.fi>
Subject: Re: [PATCH v2 3/3] crypto: aria: implement aria-avx512
Date: Sat, 5 Nov 2022 10:31:41 -0700 [thread overview]
Message-ID: <d438e0d8-7469-7584-405b-76006372c2d4@intel.com> (raw)
In-Reply-To: <MW5PR84MB1842E11FD1CF7B44703A42B0AB3A9@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM>
On 11/5/22 09:20, Elliott, Robert (Servers) wrote:
> --- a/arch/x86/crypto/aesni-intel_glue.c
> +++ b/arch/x86/crypto/aesni-intel_glue.c
> @@ -288,6 +288,10 @@ static int aes_set_key_common(struct crypto_tfm *tfm, void *raw_ctx,
> struct crypto_aes_ctx *ctx = aes_ctx(raw_ctx);
> int err;
>
> + BUILD_BUG_ON(offsetof(struct crypto_aes_ctx, key_enc) != 0);
> + BUILD_BUG_ON(offsetof(struct crypto_aes_ctx, key_dec) != 240);
> + BUILD_BUG_ON(offsetof(struct crypto_aes_ctx, key_length) != 480);
We have a nice fancy way of doing these. See things like
CPU_ENTRY_AREA_entry_stack or TSS_sp0. It's all put together from
arch/x86/kernel/asm-offsets.c and gets plopped in
include/generated/asm-offsets.h.
This is vastly preferred to hard-coded magic number offsets, even if
they do have a BUILD_BUG_ON() somewhere.
next prev parent reply other threads:[~2022-11-05 17:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-05 8:20 [PATCH v2 0/3] crypto: aria: implement aria-avx2 and aria-avx512 Taehee Yoo
2022-11-05 8:20 ` [PATCH v2 1/3] crypto: aria: add keystream array into struct aria_ctx Taehee Yoo
2022-11-05 8:20 ` [PATCH v2 2/3] crypto: aria: implement aria-avx2 Taehee Yoo
2022-11-05 8:20 ` [PATCH v2 3/3] crypto: aria: implement aria-avx512 Taehee Yoo
2022-11-05 16:20 ` Elliott, Robert (Servers)
2022-11-05 17:31 ` Dave Hansen [this message]
2022-11-06 7:07 ` Taehee Yoo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d438e0d8-7469-7584-405b-76006372c2d4@intel.com \
--to=dave.hansen@intel.com \
--cc=ap420073@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=elliott@hpe.com \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=jussi.kivilinna@iki.fi \
--cc=linux-crypto@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).