From: Jiazi Li <jqqlijiazi@gmail.com>
To: Kees Cook <kees@kernel.org>, Andy Shevchenko <andy@kernel.org>,
Julia Lawall <Julia.Lawall@inria.fr>,
Nicolas Palix <nicolas.palix@imag.fr>
Cc: Jiazi Li <jqqlijiazi@gmail.com>, linux-hardening@vger.kernel.org
Subject: [PATCH v2 0/2] Add str_alloc_free()/str_free_alloc helper and
Date: Thu, 30 Apr 2026 14:40:03 +0800 [thread overview]
Message-ID: <cover.1777529232.git.jqqlijiazi@gmail.com> (raw)
Currently finds 4 locations:
./drivers/net/wireless/realtek/rtw89/fw.c:2557:7-12: opportunity for str_alloc_free(valid)
./drivers/net/wireless/realtek/rtw89/fw.c:2693:7-12: opportunity for str_alloc_free(valid)
./drivers/android/tests/binder_alloc_kunit.c:196:6-21: opportunity for str_alloc_free(alloc -> pages [ i ])
./mm/slub.c:1634:3-8: opportunity for str_alloc_free(alloc)
Jiazi Li (2):
lib/string_choices: Add str_alloc_free() helper
coccinelle: Add rules to find str_alloc_free() replacements
include/linux/string_choices.h | 6 +
scripts/coccinelle/api/string_choices.cocci | 228 ++++++++++++--------
2 files changed, 139 insertions(+), 95 deletions(-)
--
2.49.0
next reply other threads:[~2026-04-30 6:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 6:40 Jiazi Li [this message]
2026-04-30 6:40 ` [PATCH v2 1/2] lib/string_choices: Add str_alloc_free() helper Jiazi Li
2026-05-01 8:51 ` Andy Shevchenko
2026-04-30 6:40 ` [PATCH v2 2/2] coccinelle: Add rules to find str_alloc_free() replacements Jiazi Li
2026-05-01 8:53 ` Andy Shevchenko
2026-05-01 8:54 ` [PATCH v2 0/2] Add str_alloc_free()/str_free_alloc helper and Andy Shevchenko
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=cover.1777529232.git.jqqlijiazi@gmail.com \
--to=jqqlijiazi@gmail.com \
--cc=Julia.Lawall@inria.fr \
--cc=andy@kernel.org \
--cc=kees@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=nicolas.palix@imag.fr \
/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