From: Manuel Ebner <manuelebnerli@mailbox.org>
To: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Cheng-Yang Chou <yphbchou0911@gmail.com>,
Eric Biggers <ebiggers@kernel.org>
Cc: Manuel Ebner <manuelebnerli@mailbox.org>,
Kees Cook <kees@kernel.org>,
linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] crypto: arm64/aes-neonbs: transition to kmalloc_obj()
Date: Sun, 30 Aug 2026 12:17:14 +0200 [thread overview]
Message-ID: <20260830101714.625728-3-manuelebnerli@mailbox.org> (raw)
Convert to type aware allocation as suggested in commit 2932ba8d9c99
("slab: Introduce kmalloc_obj() and family")
CC: Kees Cook <kees@kernel.org>
Fixes: 652a3017c485 ("crypto: arm64/aes-neonbs - Move key expansion off the stack")
Signed-off-by: Manuel Ebner <manuelebnerli@mailbox.org>
---
I have a couple similar patches lined up but they could be automated or maybe
the script is already made by Kees.
Kees can you make a script assisted commit (again)?
---
arch/arm64/crypto/aes-neonbs-glue.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/crypto/aes-neonbs-glue.c b/arch/arm64/crypto/aes-neonbs-glue.c
index 5bcbac979..7cb1aede9 100644
--- a/arch/arm64/crypto/aes-neonbs-glue.c
+++ b/arch/arm64/crypto/aes-neonbs-glue.c
@@ -66,7 +66,7 @@ static int aesbs_setkey(struct crypto_skcipher *tfm, const u8 *in_key,
struct crypto_aes_ctx *rk;
int err;
- rk = kmalloc(sizeof(*rk), GFP_KERNEL);
+ rk = kmalloc_obj(*rk);
if (!rk)
return -ENOMEM;
@@ -128,7 +128,7 @@ static int aesbs_cbc_ctr_setkey(struct crypto_skcipher *tfm, const u8 *in_key,
struct crypto_aes_ctx *rk;
int err;
- rk = kmalloc(sizeof(*rk), GFP_KERNEL);
+ rk = kmalloc_obj(*rk);
if (!rk)
return -ENOMEM;
--
2.54.0
next reply other threads:[~2026-08-30 10:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 10:17 Manuel Ebner [this message]
2026-08-31 20:41 ` [PATCH] crypto: arm64/aes-neonbs: transition to kmalloc_obj() Eric Biggers
2026-09-02 20:17 ` Kees Cook
2026-09-03 7:36 ` Manuel Ebner
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=20260830101714.625728-3-manuelebnerli@mailbox.org \
--to=manuelebnerli@mailbox.org \
--cc=catalin.marinas@arm.com \
--cc=davem@davemloft.net \
--cc=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=kees@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=will@kernel.org \
--cc=yphbchou0911@gmail.com \
/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