From: Manuel Ebner <manuelebnerli@mailbox.org>
To: Kees Cook <kees@kernel.org>
Cc: 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>,
linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: arm64/aes-neonbs: transition to kmalloc_obj()
Date: Thu, 03 Sep 2026 09:36:02 +0200 [thread overview]
Message-ID: <4695582913c5f171a1b887eb0e3d2d4883d319d5.camel@mailbox.org> (raw)
In-Reply-To: <202609021314.8A9C0B8@keescook>
On Wed, 2026-09-02 at 13:17 -0700, Kees Cook wrote:
> On Sun, Aug 30, 2026 at 12:17:14PM +0200, Manuel Ebner wrote:
> > 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)?
>
> This lead me down quite a long path to try to figure out why the existing
> Coccinelle script (scripts/coccinelle/api/kmalloc_objs.cocci) didn't
> catch these. The answer is the cleanup.h macros and poor interaction
> with Coccinelle. I think I've got a work-around built now, and I'll send
> a new tree-wide change to Linus before -rc2 gets cut.
>
> Thanks for noticing these got missed!
I think they got introduced after the big '+_obj' commit, this commit 652a3017c485
("crypto: arm64/aes-neonbs - Move key expansion off the stack") is from Mar 6 2026.
I did git checkout this commit and run checkpatch.pl (from Mar 6) over the commit:
WARNING: Prefer kmalloc_obj over kmalloc with sizeof
#37: FILE: arch/arm64/crypto/aes-neonbs-glue.c:82:
+ rk = kmalloc(sizeof(*rk), GFP_KERNEL);
So the recommended workflow should have caught this.
Thanks for handling this.
Manuel
> -Kees
prev parent reply other threads:[~2026-09-03 7:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 10:17 [PATCH] crypto: arm64/aes-neonbs: transition to kmalloc_obj() Manuel Ebner
2026-08-31 20:41 ` Eric Biggers
2026-09-02 20:17 ` Kees Cook
2026-09-03 7:36 ` Manuel Ebner [this message]
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=4695582913c5f171a1b887eb0e3d2d4883d319d5.camel@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