]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
arm64: mm: Permit transitioning from Global to Non-Global without BBM
authorWill Deacon <will.deacon@arm.com>
Mon, 29 Jan 2018 11:59:54 +0000 (11:59 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Tue, 27 Feb 2018 16:32:55 +0000 (11:32 -0500)
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.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit ee28fed5ccc66fbdef4119451aa6754501705a7e)

CVE-2017-5753
CVE-2017-5715
CVE-2017-5754

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/arm64/mm/mmu.c

index 606c3654186ffa13d2e530d28d9621af7ff5bfb4..fa20124c19d57a3468d7eab46ba705bf44baf857 100644 (file)
@@ -117,6 +117,10 @@ static bool pgattr_change_is_safe(u64 old, u64 new)
        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;
 }