lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 19 Oct 2017 08:39:16 +0800 From: Lu Baolu <baolu.lu@...ux.intel.com> To: joro@...tes.org, dwmw2@...radead.org Cc: ashok.raj@...el.com, jacob.jun.pan@...ux.intel.com, iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org, Lu Baolu <baolu.lu@...ux.intel.com> Subject: [PATCH 3/3] iommu/vt-d: Clear pasid table entry when memory unbound In intel_svm_unbind_mm(), pasid table entry must be cleared during svm free. Otherwise, hardware may be set up with a wild pointer. Suggested-by: Ashok Raj <ashok.raj@...el.com> Signed-off-by: Lu Baolu <baolu.lu@...ux.intel.com> --- drivers/iommu/intel-svm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c index 43280ca..ed1cf7c 100644 --- a/drivers/iommu/intel-svm.c +++ b/drivers/iommu/intel-svm.c @@ -458,6 +458,8 @@ int intel_svm_unbind_mm(struct device *dev, int pasid) kfree_rcu(sdev, rcu); if (list_empty(&svm->devs)) { + svm->iommu->pasid_table[svm->pasid].val = 0; + wmb(); idr_remove(&svm->iommu->pasid_idr, svm->pasid); if (svm->mm) -- 2.7.4
Powered by blists - more mailing lists