Re: [PATCH 1/1] crypto: arm64/aes-neonbs - Move key expansion off the stack

From: Cheng-Yang Chou

Date: Fri Mar 06 2026 - 00:46:46 EST


Hi Eric,

On Thu, Mar 05, 2026 at 11:38:47AM -0800, Eric Biggers wrote:
> Instead of memzero_explicit() followed by kfree(), just use
> kfree_sensitive().
>
> Also, single patches should not have a cover letter. Just send a single
> patch email with all the details in the patch itself.
>
> As for the actual change, I guess it's okay for now. Ideally we'd
> refactor the aes-bs key preparation to not need temporary space.

Thanks for the feedback.
I'll send a v2 to address your comments.

The arm implementation also allocates struct crypto_aes_ctx on the
stack in aesbs_setkey(). Should I include a fix for it as well?
Note that I can only test on arm64.

Also, I'd be happy to help with the refactoring if you can point me
in the right direction.

--
Thanks,
Cheng-Yang