All of lore.kernel.org
 help / color / mirror / Atom feed
From: Taehee Yoo <ap420073@gmail.com>
To: "Elliott, Robert (Servers)" <elliott@hpe.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>,
	"x86@kernel.org" <x86@kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>
Subject: Re: [PATCH v2 2/3] crypto: aria-avx: add AES-NI/AVX/x86_64 assembler implementation of aria cipher
Date: Sat, 27 Aug 2022 15:18:19 +0900	[thread overview]
Message-ID: <258295d3-13af-db2c-d2c4-d571b6b44cd9@gmail.com> (raw)
In-Reply-To: <MW5PR84MB1842DCF66CD8692D99545D98AB759@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM>

Hi Elliott, Robert
Thanks for your review!

2022. 8. 27. 오전 12:12에 Elliott, Robert (Servers) 이(가) 쓴 글:
 >
 >
 >> -----Original Message-----
 >> From: Taehee Yoo <ap420073@gmail.com>
 >> Sent: Friday, August 26, 2022 12:32 AM
 >> Subject: [PATCH v2 2/3] crypto: aria-avx: add AES-NI/AVX/x86_64 
assembler
 >> implementation of aria cipher
 >>
 >> v2:
 >>   - Do not call non-FPU functions(aria_{encrypt | decrypt}() in the
 >>     FPU context.
 >>   - Do not acquire FPU context for too long.
 >
 > ...
 >> +static int ecb_do_encrypt(struct skcipher_request *req, const u32 
*rkey)
 >> +{
 > ...
 >> +	while ((nbytes = walk.nbytes) > 0) {
 >> +		const u8 *src = walk.src.virt.addr;
 >> +		u8 *dst = walk.dst.virt.addr;
 >> +
 >> +		kernel_fpu_begin();
 >> +		while (nbytes >= ARIA_AVX_BLOCK_SIZE) {
 >> +			aria_aesni_avx_crypt_16way(rkey, dst, src, ctx->rounds);
 >> +			dst += ARIA_AVX_BLOCK_SIZE;
 >> +			src += ARIA_AVX_BLOCK_SIZE;
 >> +			nbytes -= ARIA_AVX_BLOCK_SIZE;
 >> +		}
 >> +		kernel_fpu_end();
 >
 > Per Herbert's reply on the sha512-avx RCU stall issue, another nesting
 > level might be necessary limiting the amount of data processed between
 > each kernel_fpu_begin() to kernel_fpu_end() pair to 4 KiB.
 >
 > If you modify this driver to use the ECB_WALK_START, ECB_BLOCK, and
 > ECB_WALK_END macros from ecb_cbc_helpers.h and incorporate that fix,
 > then your fix would be easy to replicate into the other users (camellia,
 > cast5, cast6, serpent, and twofish).
 >

Now I understand why you suggested using ECB macro instead of open code.
I think your idea is nice for many users such as camellia, cast5, etc.

I will use ECB macro in the v3 patch.
Then, I will send a fixing the RCU stall issue patch separately instead 
of containing it.

Thanks a lot!
Taehee Yoo

  reply	other threads:[~2022-08-27  6:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26  5:31 [PATCH v2 0/3] crypto: aria: add ARIA AES-NI/AVX/x86_64 implementation Taehee Yoo
2022-08-26  5:31 ` [PATCH v2 1/3] crypto: aria: prepare generic module for optimized implementations Taehee Yoo
2022-08-26  5:31 ` [PATCH v2 2/3] crypto: aria-avx: add AES-NI/AVX/x86_64 assembler implementation of aria cipher Taehee Yoo
2022-08-26 15:12   ` Elliott, Robert (Servers)
2022-08-27  6:18     ` Taehee Yoo [this message]
2022-08-27  2:46   ` Eric Biggers
2022-08-27  6:30     ` Taehee Yoo
2022-08-27  6:35       ` Eric Biggers
2022-08-27  6:50         ` Taehee Yoo
2022-09-01 19:51   ` Jussi Kivilinna
2022-09-02  8:31     ` Taehee Yoo
2022-08-26  5:31 ` [PATCH v2 3/3] crypto: tcrypt: add async speed test for " Taehee Yoo
2022-09-01 20:09 ` [PATCH v2 0/3] crypto: aria: add ARIA AES-NI/AVX/x86_64 implementation Jussi Kivilinna
2022-09-02  9:39   ` 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=258295d3-13af-db2c-d2c4-d571b6b44cd9@gmail.com \
    --to=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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.