Skip to content

[PW_SID:991816] [v3] iommu/riscv: prevent NULL deref in iova_to_phys - #780

Closed
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw991816
Closed

[PW_SID:991816] [v3] iommu/riscv: prevent NULL deref in iova_to_phys#780
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw991816

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 991816 applied to workflow__riscv__fixes

Name: [v3] iommu/riscv: prevent NULL deref in iova_to_phys
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=991816
Version: 3

The riscv_iommu_pte_fetch() function returns either NULL for
unmapped/never-mapped iova, or a valid leaf pte pointer that requires no
further validation.

riscv_iommu_iova_to_phys() failed to handle NULL returns. Fix by adding NULL
check before dereferencing and returning 0 for invalid iova.

Fixes: 488ffbf ("iommu/riscv: Paging domain support")
Cc: Tomasz Jeznach <tjeznach@rivosinc.com>
Signed-off-by: XianLiang Huang <huangxianliang@lanxincomputing.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 105.02 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1107.10 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1560.06 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.91 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.16 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.76 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.29 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys"
kdoc
Desc: Detects for kdoc errors
Duration: 0.91 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys"
module-param
Desc: Detect module_param changes
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot deleted the pw991816 branch August 20, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant