Skip to content

Implement access checks in iommu page fault paths

Joerg Roedel linux-iommu lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 6 repliesIn review
  2. v14 patches 4 repliesSuperseded

Changes in v2 from the cover letter

* Updated the access_error functions based on Linus' feedback
* Rebased to v4.4-rc1

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4iommu/amd: Do proper access checking before calling handle_mm_fault()drivers/iommu/amd_iommu_v2.c+18 -20 replies
2/4iommu/amd: Correctly set flags for handle_mm_fault calldrivers/iommu/amd_iommu_v2.c+9 -50 replies
3/4iommu/amd: Cleanup error handling in do_fault()drivers/iommu/amd_iommu_v2.c+8 -160 replies
4/4iommu/vt-d: Do access checks before calling handle_mm_fault()drivers/iommu/intel-svm.c+20 -02 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchDavid Woodhouse
1/4
2/4
3/4
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH 0/4 v2] Implement access checks in iommu page fault paths

Hi,

here is the second version of the patch-set to implement proper access checks into the io-page-fault handlers of the AMD IOMMU and Intel VT-d drivers.

Two additional patches clean up the AMD part a bit further. Since I can't test this this code myself due to lack of hardware or software that utilizes it, I'd appreciate some external testing.

It took me a while to get these out, mostly because I tried to setup my own HSA test environment to at least test the AMD changes myself. That failed, so I am sending this out with another request for testing.

Oded, Jesse, would you two please test these patches and report back? Thanks a lot!

Joerg

Changes since v1:

* Updated the access_error functions based on Linus' feedback
* Rebased to v4.4-rc1

Joerg Roedel (4):
iommu/amd: Do proper access checking before calling handle_mm_fault() iommu/amd: Correctly set flags for handle_mm_fault call iommu/amd: Cleanup error handling in do_fault() iommu/vt-d: Do access checks before calling handle_mm_fault()

 drivers/iommu/amd_iommu_v2.c | 54 +++++++++++++++++++++++++++-----------------
 drivers/iommu/intel-svm.c    | 20 ++++++++++++++++
 2 files changed, 53 insertions(+), 21 deletions(-)
Signature · 1 line
1.9.1