diff options
| author | Mitchel Humpherys <mitchelh@codeaurora.org> | 2015-09-23 13:56:27 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:14:18 -0700 |
| commit | 16135b65406895cc3ab28f39ccd5c2b44cd1aa94 (patch) | |
| tree | bc0b9cd9b3f97eef873ffe4a0bf122561f67de03 | |
| parent | aa728b977c2182ef7e5663507a8fa7d5e9062875 (diff) | |
iommu/io-pgtable-arm: Stricter double-map checking
Currently there's a check to make sure that a mapping isn't being
installed on top of an existing leaf mapping. However, mapping on top
of an existing table mapping is silently ignored. Make the check more
strict by testing for any valid page table entry (table, block, or page
descriptor) and by making any overlap fatal.
Change-Id: Ibdffbfdb2b44cf9da5044c2c1828a32979a39760
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
| -rw-r--r-- | drivers/iommu/io-pgtable-arm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c index 9876f6b6a674..90d0438a47ed 100644 --- a/drivers/iommu/io-pgtable-arm.c +++ b/drivers/iommu/io-pgtable-arm.c @@ -282,8 +282,8 @@ static int arm_lpae_init_pte(struct arm_lpae_io_pgtable *data, arm_lpae_iopte pte = prot; /* We require an unmap first */ - if (iopte_leaf(*ptep, lvl)) { - WARN_ON(!suppress_map_failures); + if (*ptep & ARM_LPAE_PTE_VALID) { + BUG_ON(!suppress_map_failures); return -EEXIST; } |
