From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75DC4FD45EC for ; Wed, 25 Feb 2026 21:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NqE24NeHlE390c754vRFT9KHf0WbCSZMVlQqv/lXfjM=; b=euKsvqhFMQhHj4ALxs3vFp6c7w FQDtYMD6wRC24mCnHAI+BwrRwtJWRJ8vExmfxLajH3zVLo88/djrQLqjNUf4AD685HHKx8KPjZ9y1 r5xKVifxsVqK8uXdstBqnkfsAtn+gaBTc0W2ledjkAFkGmFM5I+QxXSZsbVFkJS3r/UmEjb2gYSUU 1Ghz6O/8nyq7v1v8wpcgLXGfsG+/T48wKZEkkYq6pnfeZ2Etp/X9OKGBnwQcAzfCYUIJdoPiCnFvk TsIpQhB1cKBqB0WFVd99cbFQyykdLwyIXFB5mUgrDnrbQFt7FjZThoid+OEJIF/bUQGvx3Pf6e9d4 cZjW8Q6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vvM93-00000004tkI-1kLu; Wed, 25 Feb 2026 21:10:09 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vvM8z-00000004tjA-0Dcz for linux-arm-kernel@lists.infradead.org; Wed, 25 Feb 2026 21:10:08 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 16B9543E5D; Wed, 25 Feb 2026 21:10:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7B60C116D0; Wed, 25 Feb 2026 21:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772053803; bh=Emi3KkH/jcVD4KyPMdssqmofw4pq2LM2PhoufghVNX4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GOnoAjVyoHyYx+YAJwQN8sbbkdW6Y20ns11e7lgNNQrsDnavc1eEJKMj579fKqT7k E/Hv/a1w4p7n+DtDoJtm9MDkh3tjm0inc7ndTFCwPIBEhITmeKQQlp70mWmDGvVO/D MCKzyg7KrpN4JHd9E+WuhV/ntqGrl/wjBWZnwxRUpdxPLti69Ta0yLkhahQ4zHYUIR ToVQtjFCF/bU5cZzVdHEuHytvYxyxEMlRBJqZB5J1RqPB11tQj8/rmaPvuJwg/u1h5 QEn/qvS/Ha/jz8JHmtG7h/6S2ylow0gfZC0XjwUT3KuyAjjznr9AXNilk6eYzQqN4s 7EDkSGYJ3yqWw== Received: from sofa.misterjones.org ([185.219.108.64] helo=lobster-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vvM8v-0000000DqZl-1xwz; Wed, 25 Feb 2026 21:10:01 +0000 Date: Wed, 25 Feb 2026 21:10:00 +0000 Message-ID: <877bs0edhz.wl-maz@kernel.org> From: Marc Zyngier To: Kees Cook Cc: Oliver Upton , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Alexander Potapenko , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, Timothy Hayes , Sascha Bischoff , Keir Fraser , 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 In-Reply-To: <202602251238.9850FCB@keescook> References: <20260206223022.it.052-kees@kernel.org> <177099499992.1792318.9934885934778681296.b4-ty@kernel.org> <202602251238.9850FCB@keescook> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kees@kernel.org, oupton@kernel.org, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, glider@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, timothy.hayes@arm.com, Sascha.Bischoff@arm.com, keirf@google.com, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260225_131005_129146_2352D163 X-CRM114-Status: GOOD ( 23.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 25 Feb 2026 20:40:59 +0000, Kees Cook wrote: > > 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. 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.