summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorShuai Xue <xueshuai@linux.alibaba.com>2026-07-26 15:43:32 +0800
committerJoerg Roedel <joerg.roedel@amd.com>2026-08-10 09:51:52 +0200
commit41cdc2a3d41b505c1dff9e6c1ab4c76d4cc1f995 (patch)
tree199334c0a284ba5967c4194fbf004a68f9c1e71c /tools/perf/scripts/python
parent4ac2ce123824d5f885c868fa1f9f4d463141a2ba (diff)
iommupt: Return zero for invalid iova_to_phys() ranges
DOMAIN_NS(iova_to_phys) returns a phys_addr_t and follows the IOMMU iova_to_phys() convention of returning 0 when there is no valid translation. make_range() returns a negative errno if the input IOVA cannot be represented by this page table format. Returning that errno directly casts it to phys_addr_t. Callers treat zero as no translation and use non-zero values as physical addresses, so this can make them consume a bogus physical address instead of seeing a failed translation. Match the page-table walk failure path and return 0 for range validation failures too. Fixes: 9d4c274cd7d5 ("iommupt: Add iova_to_phys op") Cc: stable@vger.kernel.org Assisted-by: Qoder:Qwen-3.8-MAX-Preview Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions