4.15-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Will Deacon <will.dea...@arm.com>


Commit 4e6020565596 upstream.

Break-before-make is not needed when transitioning from Global to
Non-Global mappings, provided that the contiguous hint is not being used.

Signed-off-by: Will Deacon <will.dea...@arm.com>
Signed-off-by: Catalin Marinas <catalin.mari...@arm.com>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 arch/arm64/mm/mmu.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -117,6 +117,10 @@ static bool pgattr_change_is_safe(u64 ol
        if ((old | new) & PTE_CONT)
                return false;
 
+       /* Transitioning from Global to Non-Global is safe */
+       if (((old ^ new) == PTE_NG) && (new & PTE_NG))
+               return true;
+
        return ((old ^ new) & ~mask) == 0;
 }
 


Reply via email to