From: Ben Hutchings Date: Thu, 16 Mar 2017 03:05:43 +0000 (+0000) Subject: Don't WARN about expected W+X pages on Xen X-Git-Tag: archive/raspbian/4.9.82-1+deb9u3+rpi1_jessie~10^2~99 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4536fb18fe265038d57be8b707eeb25d2e8e9d85;p=linux-4.9.git Don't WARN about expected W+X pages on Xen Currently Xen PV domains (or at least dom0) on amd64 tend to have a large number of low kernel pages with W+X permissions. It's not obvious how to fix this, and we're not going to get any new information by WARNing about this, but we do still want to hear about other W+X cases. So add a condition to the WARN_ON. Gbp-Pq: Topic debian Gbp-Pq: Name amd64-don-t-warn-about-expected-w+x-pages-on-xen.patch --- diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index 8aa6bea1cd6c..4f52c9a38c5c 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch/x86/mm/dump_pagetables.c @@ -17,6 +17,7 @@ #include #include #include +#include #include @@ -220,7 +221,7 @@ static void note_page(struct seq_file *m, struct pg_state *st, pgprotval_t pr = pgprot_val(st->current_prot); if (st->check_wx && (pr & _PAGE_RW) && !(pr & _PAGE_NX)) { - WARN_ONCE(1, + WARN_ONCE(!(IS_ENABLED(CONFIG_X86_64) && xen_pv_domain()), "x86/mm: Found insecure W+X mapping at address %p/%pS\n", (void *)st->start_address, (void *)st->start_address);