mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rob Herring (Arm)" <robh@kernel.org>
To: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Cc: stable@vger.kernel.org, Lu Baolu <baolu.lu@linux.intel.com>,
	Tomasz Nowicki <tomasz.nowicki@caviumnetworks.com>,
	virtualization@lists.linux.dev, devicetree@vger.kernel.org,
	kvm@vger.kernel.org, linux-media@vger.kernel.org,
	iommu@lists.linux.dev,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Sashiko <sashiko-bot@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Eric Auger <eric.auger@redhat.com>,
	Vasant Hegde <vasant.hegde@amd.com>,
	Will Deacon <will@kernel.org>,
	Oza Pawandeep <quic_poza@quicinc.com>,
	linux-arm-msm@vger.kernel.org,
	Jean-Philippe Brucker <jpb@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"Joerg Roedel (AMD)" <joro@8bytes.org>,
	Srinath Mannam <srinath.mannam@broadcom.com>,
	linux-kernel@vger.kernel.org, Joerg Roedel <jroedel@suse.de>,
	Saravana Kannan <saravanak@kernel.org>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Vishnu Reddy <busanna.reddy@oss.qualcomm.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Alex Williamson <alex@shazbot.org>
Subject: Re: [PATCH v7 2/5] iommu: Use resource_size_t for reserved region length
Date: Tue, 10 Nov 2026 11:28:29 -0600	[thread overview]
Message-ID: <179433170801.751718.12828883568888640225.robh@kernel.org> (raw)
In-Reply-To: <20261106-add_iommu_ranges-v7-2-5c0f72083e52@oss.qualcomm.com>


On Fri, 06 Nov 2026 22:44:25 +0530, Vikash Garodia wrote:
> On 32-bit systems with LPAE, physical addresses are 64-bit. A reserved
> region can be larger than 4GiB, but its length is stored as size_t,
> which is only 32-bit there. The length gets truncated.
> Use resource_size_t for the length so it matches the width of
> phys_addr_t and holds the full size of the region.
> 
> Fixes: 2b20cbba3390 ("iommu: iommu_alloc_resv_region")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://lore.kernel.org/all/d223ee9f-b262-408a-a201-8b16d310bbe0@oss.qualcomm.com
> Cc: stable@vger.kernel.org
> Co-developed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
> Signed-off-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
> ---
>  drivers/iommu/amd/iommu.c       | 2 +-
>  drivers/iommu/intel/iommu.c     | 2 +-
>  drivers/iommu/iommu.c           | 2 +-
>  drivers/iommu/of_iommu.c        | 4 ++--
>  drivers/iommu/virtio-iommu.c    | 2 +-
>  drivers/of/address.c            | 2 +-
>  drivers/vfio/vfio_iommu_type1.c | 2 +-
>  include/linux/iommu.h           | 4 ++--
>  include/linux/of_address.h      | 2 +-
>  9 files changed, 11 insertions(+), 11 deletions(-)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


  reply	other threads:[~2026-11-10 17:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 17:14 [PATCH v7 0/5] of_iommu: add support for "iommu-ranges" Vikash Garodia
2026-11-06 17:14 ` [PATCH v7 1/5] iommu/dma: Keep reserved regions below the IOVA rbtree anchor Vikash Garodia
2026-11-06 17:14 ` [PATCH v7 2/5] iommu: Use resource_size_t for reserved region length Vikash Garodia
2026-11-10 17:28   ` Rob Herring (Arm) [this message]
2026-11-06 17:14 ` [PATCH v7 3/5] iommu/of: Make OF_IOMMU depend on OF_ADDRESS Vikash Garodia
2026-11-06 17:14 ` [PATCH v7 4/5] iommu/of: Require reg for iommu-addresses Vikash Garodia
2026-11-06 17:14 ` [PATCH v7 5/5] iommu/of: Add support for "iommu-ranges" on a device node Vikash Garodia

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=179433170801.751718.12828883568888640225.robh@kernel.org \
    --to=robh@kernel.org \
    --cc=alex@shazbot.org \
    --cc=baolu.lu@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=busanna.reddy@oss.qualcomm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=eric.auger@redhat.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=jpb@kernel.org \
    --cc=jroedel@suse.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=quic_poza@quicinc.com \
    --cc=robin.murphy@arm.com \
    --cc=saravanak@kernel.org \
    --cc=sashiko-bot@kernel.org \
    --cc=srinath.mannam@broadcom.com \
    --cc=stable@vger.kernel.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tomasz.nowicki@caviumnetworks.com \
    --cc=vasant.hegde@amd.com \
    --cc=vikash.garodia@oss.qualcomm.com \
    --cc=virtualization@lists.linux.dev \
    --cc=will@kernel.org \
    /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

all inboxes | Powered by JetHome®