From: Kees Cook <kees@kernel.org>
To: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oupton@kernel.org>, Joey Gouly <joey.gouly@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Alexander Potapenko <glider@google.com>,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
Timothy Hayes <timothy.hayes@arm.com>,
Sascha Bischoff <Sascha.Bischoff@arm.com>,
Keir Fraser <keirf@google.com>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH v2] KVM: arm64: vgic: Handle const qualifier from gic_kvm_info allocation type
Date: Wed, 25 Feb 2026 12:40:59 -0800 [thread overview]
Message-ID: <202602251238.9850FCB@keescook> (raw)
In-Reply-To: <177099499992.1792318.9934885934778681296.b4-ty@kernel.org>
On Fri, Feb 13, 2026 at 03:03:24PM +0000, Marc Zyngier wrote:
> On Fri, 06 Feb 2026 14:30:23 -0800, Kees Cook wrote:
> > In preparation for making the kmalloc family of allocators type aware,
> > we need to make sure that the returned type from the allocation matches
> > the type of the variable being assigned. (Before, the allocator would
> > always return "void *", which can be implicitly cast to any pointer type.)
> >
> > The assigned type is "struct gic_kvm_info", but the returned type,
> > while matching, is const qualified. To get them exactly matching, just
> > use the dereferenced pointer for the sizeof().
> >
> > [...]
>
> Applied to fixes, thanks!
>
> [1/1] KVM: arm64: vgic: Handle const qualifier from gic_kvm_info allocation type
> commit: ee5c38a8d31e5dea52299c43c2ec3213351ab6e1
Just a heads-up that I ended up sending this patch to Linus for -rc1 as
it was a prerequisite for the tree-wide kmalloc_obj refactoring. Sorry
for any merge conflicts this might create for your tree! It is now
commit c732084c891d there.
--
Kees Cook
next prev parent reply other threads:[~2026-02-25 20:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 22:30 [PATCH v2] KVM: arm64: vgic: Handle const qualifier from gic_kvm_info allocation type Kees Cook
2026-02-13 15:03 ` Marc Zyngier
2026-02-25 20:40 ` Kees Cook [this message]
2026-02-25 21:10 ` Marc Zyngier
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=202602251238.9850FCB@keescook \
--to=kees@kernel.org \
--cc=Sascha.Bischoff@arm.com \
--cc=catalin.marinas@arm.com \
--cc=glider@google.com \
--cc=joey.gouly@arm.com \
--cc=keirf@google.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=timothy.hayes@arm.com \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.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