From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CC8C3A89D2 for ; Tue, 20 Jan 2026 08:51:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768899085; cv=none; b=ayBj/d1wQPHK8mj/P3zKW7htvr7Ch2bXp9SZqrFq2L3yflmrn6uMMHwFSHrC+dNHcr1geFime7UKrurVQrisQ7pubj4ca21jbeGPsvkTthNa7WnDJGpWFl6cFeS2e/lDcaeExddMUXM0uAh1zlSu8gqneGXEf1Uth6dQUvnNpMI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768899085; c=relaxed/simple; bh=0qqZcXwewgCra44/OVmb2SxI5QIra74CGIRy0/GgJdA=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=KD8ZwcE0ehPUdIJLTznyB/Pqy+Ic199u/T+w8FjQAPi75RSOid5Pul7pgC3xx6/7ta9dWs1RU26tmLhO/exGyG9tt+sN7Dz5rX+P+f0ftMn5ruKYv3EXEk/HsHrR2eEei9vPFSOpSGb71hroa9hlJ0VckZhRGhs0PuGEpDgJ79I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LiALLCDj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LiALLCDj" 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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.