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 95962D2ED0F for ; Tue, 20 Jan 2026 08:51:35 +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=cizVlM/FSU3V8OattKzsGL9otWiSel8DOa2bw/UwOso=; b=sFn/vMfLn1MRmIHjHANk0uD1Ne et63CuwblEx9jIliIa/9N/Pu1wNwWj9BwZt5HsCw1imoWW5rwmQlzBg50rE6PCTtOLeGQvmRXCa20 Bata2kXL4d6O5TmzUvgGrwgRRxv53RHqogm1FCI8oAR05HwiExvo9k67Q2CCuJGSYyhPESetnSl2x wSBpliJpp4ULIfc9ERZMU2Z/AfHYGC70gI0dq1XY1LnBspCSEanrTOrunobdWO2W5Pwet0P4I8USL O/gNwXx2sfrsSXXmrHXWIPERX4xh+tc2cVjURrvpQ4KhcGqwJm4q/dEPz2nptm3Ff02Vxbf3/tC+l FWuIxaog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vi7SU-00000003UA1-0cUA; Tue, 20 Jan 2026 08:51:30 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vi7SQ-00000003U9G-2u2h for linux-arm-kernel@lists.infradead.org; Tue, 20 Jan 2026 08:51:29 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 9C4E843A39; Tue, 20 Jan 2026 08:51:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 765B7C16AAE; Tue, 20 Jan 2026 08:51:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768899085; bh=0qqZcXwewgCra44/OVmb2SxI5QIra74CGIRy0/GgJdA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LiALLCDjqJOmQJs4bj8DU8ZYUuc1PAFySzY64XAlW6f++OfMkJYT071WqzY2B1MNV 05K9cf/GgcxetpixR58dtsd/tX7KH8dI8BCU3H2Byk8y8+Tsdllo1jpTC2C1rz6RkT 5sYfVRMuZDwig2rxWdJ20y8+dczUpc+ssymjfnqUUo7t9wCgJtu8pDChWsWUBbKNcI XSrO2bkuorecdV7fWJSjXOY53EjlxQUN2KvCGg+FlKDl0h+kToYOaL3oBHp3fd3nyO ox5IdO1p4B7fh6usvXRoy4mLW43rBkkqjFsHb3aam8kejozTxwb7aX+sstpwCu7+M+ xh3xatBUz95IQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-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 1vi7SN-00000003s9f-0X4t; Tue, 20 Jan 2026 08:51:23 +0000 Date: Tue, 20 Jan 2026 08:51:22 +0000 Message-ID: <865x8wd5v9.wl-maz@kernel.org> From: Marc Zyngier To: Arnd Bergmann Cc: Thomas Gleixner , Arnd Bergmann , Lorenzo Pieralisi , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] irqchip: gic-v3-its: avoid truncating memory addresses In-Reply-To: <20260119201603.2713066-1-arnd@kernel.org> References: <20260119201603.2713066-1-arnd@kernel.org> 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: arnd@kernel.org, tglx@linutronix.de, arnd@arndb.de, lpieralisi@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@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-20260120_005126_770189_EF14F8F7 X-CRM114-Status: GOOD ( 21.70 ) 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 Mon, 19 Jan 2026 20:15:12 +0000, Arnd Bergmann wrote: > > From: Arnd Bergmann > > On 32-bit machines with CONFIG_ARM_LPAE, it is possible for lowmem > allocations to be backed by addresses physical memory above the 32-bit > address limit, as I found while experimenting with larger VMSPLIT > configurations. > > This caused the qemu virt model to crash in the GICv3 driver, which > allocates the 'itt' object using GFP_KERNEL. Since all memory below > the 4GB physical address limit is in ZONE_DMA in this configuration, > kmalloc defaults to higher addresses for ZONE_NORMAL, and the > its driver stores the physical address in a 32-bit 'unsigned long' > variable. > > Change the itt_addr variable to the correct phys_addr_t type instead, > along with all other variables in this driver that hold a physical > address. Ah, nice catch. It's amazing that we've managed for so long with such a glaring bug. I guess most 32bit VMs don't have much memory above the 4GB limit. > > I checked the gicv5 driver for the same problem, and it correctly > uses u64 variables, GICv5 is strictly 64bit, and cannot be plugged on a system that supports AArch32. > while all other irqchip drivers don't call > virt_to_phys or similar interfaces. I expect other drivers to > have similar issues, but fixing this one is sufficient for > booting a virtio based guest. > > Fixes: cc2d3216f53c ("irqchip: GICv3: ITS command queue") > Signed-off-by: Arnd Bergmann Cc: stable@vger.kernel.org Reviewed-by: Marc Zyngier Thanks, M. -- Without deviation from the norm, progress is not possible.