From: Dominique Martinet <asmadeus@codewreck.org>
To: Kees Cook <kees@kernel.org>
Cc: Eric Van Hensbergen <ericvh@kernel.org>,
Kees Cook <kees+treewide@kernel.org>,
Latchesar Ionkov <lucho@ionkov.net>,
Christian Schoenebeck <linux_oss@crudebyte.com>,
v9fs@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] 9p: Add const and unsigned to wnames allocation type
Date: Fri, 18 Sep 2026 08:30:51 +0900 [thread overview]
Message-ID: <aqx4K8kE1rcTxjmC@codewreck.org> (raw)
In-Reply-To: <20260917211158.i.129-kees@kernel.org>
Kees Cook wrote on Thu, Sep 17, 2026 at 02:11:59PM -0700:
> From: Kees Cook <kees+treewide@kernel.org>
>
> In preparation for converting the kmalloc family of allocators to the
> type-aware kmalloc_obj family, we need to make sure that the returned
> type from the allocation matches the type of the variable being
> assigned. (The kmalloc family returns "void *", which can be implicitly
> cast to any pointer type.)
>
> The assigned type is "const unsigned char **", but the converted
> allocation type would be "char **", which differs in both the const
> qualifier and the signedness of the character type. Take the size from
> the assignment target instead. No change in allocation size results.
>
> Build tested ARCH=x86_64 allmodconfig with GCC 16.2.0:
> fs/9p/fid.o
>
> Assisted-by: LLM coccinelle
> Signed-off-by: Kees Cook <kees+treewide@kernel.org>
Ack, will pick up this weekend for 7.4
--
Dominique
prev parent reply other threads:[~2026-09-17 23:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 21:11 Kees Cook
2026-09-17 23:30 ` Dominique Martinet [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=aqx4K8kE1rcTxjmC@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=ericvh@kernel.org \
--cc=kees+treewide@kernel.org \
--cc=kees@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=v9fs@lists.linux.dev \
/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
all inboxes | Powered by JetHome®