]> git.itanic.dy.fi Git - linux-stable/commitdiff
xen: remove global bit from __default_kernel_pte_mask for pv guests
authorJuergen Gross <jgross@suse.com>
Mon, 2 Jul 2018 10:00:18 +0000 (12:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jul 2018 09:48:32 +0000 (11:48 +0200)
commit e69b5d308da72cbf4e7911c3979f9a46d28532af upstream.

When removing the global bit from __supported_pte_mask do the same for
__default_kernel_pte_mask in order to avoid the WARN_ONCE() in
check_pgprot() when setting a kernel pte before having called
init_mem_mapping().

Cc: <stable@vger.kernel.org> # 4.17
Reported-by: Michael Young <m.a.young@durham.ac.uk>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/xen/enlighten_pv.c

index 357969a3697cc7af6e08c12144ec06f43a8841ad..2300b422c4bdc72fd1c3b44fa7937bfe3c1e0476 100644 (file)
@@ -1228,6 +1228,7 @@ asmlinkage __visible void __init xen_start_kernel(void)
 
        /* Prevent unwanted bits from being set in PTEs. */
        __supported_pte_mask &= ~_PAGE_GLOBAL;
+       __default_kernel_pte_mask &= ~_PAGE_GLOBAL;
 
        /*
         * Prevent page tables from being allocated in highmem, even