Thread (4 messages) 4 messages, 2 authors, 2026-02-25

Re: [PATCH v2] KVM: arm64: vgic: Handle const qualifier from gic_kvm_info allocation type

From: Marc Zyngier <maz@kernel.org>
Date: 2026-02-25 21:10:04
Also in: kvmarm, linux-hardening, lkml

On Wed, 25 Feb 2026 20:40:59 +0000,
Kees Cook [off-list ref] wrote:
On Fri, Feb 13, 2026 at 03:03:24PM +0000, Marc Zyngier wrote:
quoted
On Fri, 06 Feb 2026 14:30:23 -0800, Kees Cook wrote:
quoted
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.
Yup, I noticed it this morning as I was preparing the first batch of
fixes for KVM/arm64.

I'd appreciate it if in the future you would let me know upfront what
route you expect a given patch to take -- I'll happily give an ack for
a patch you want to route directly to Linus, rather than carrying it
and ending up with conflicts with upstream.

Thanks,

	M.

-- 
Jazz isn't dead. It just smells funny.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help