Re: [Xen-devel] [PATCH 2/2] x86-64/Xen: eliminate W+X mappings

2017-12-12 Thread Juergen Gross
On 12/12/17 11:48, Jan Beulich wrote: On 12.12.17 at 11:38, wrote: >> * Jan Beulich wrote: >>> --- 4.15-rc3/arch/x86/xen/mmu_pv.c >>> +++ 4.15-rc3-x86_64-Xen-avoid-W+X/arch/x86/xen/mmu_pv.c >>> @@ -1902,6 +1902,16 @@ void __init

Re: [Xen-devel] [PATCH 2/2] x86-64/Xen: eliminate W+X mappings

2017-12-12 Thread Ingo Molnar
* Jan Beulich wrote: > >>> On 12.12.17 at 11:38, wrote: > > * Jan Beulich wrote: > >> --- 4.15-rc3/arch/x86/xen/mmu_pv.c > >> +++ 4.15-rc3-x86_64-Xen-avoid-W+X/arch/x86/xen/mmu_pv.c > >> @@ -1902,6 +1902,16 @@ void __init

Re: [Xen-devel] [PATCH 2/2] x86-64/Xen: eliminate W+X mappings

2017-12-12 Thread Jan Beulich
>>> On 12.12.17 at 11:38, wrote: > * Jan Beulich wrote: >> --- 4.15-rc3/arch/x86/xen/mmu_pv.c >> +++ 4.15-rc3-x86_64-Xen-avoid-W+X/arch/x86/xen/mmu_pv.c >> @@ -1902,6 +1902,16 @@ void __init xen_setup_kernel_pagetable(p >> /* Graft it onto L4[511][510]

Re: [Xen-devel] [PATCH 2/2] x86-64/Xen: eliminate W+X mappings

2017-12-12 Thread Ingo Molnar
* Jan Beulich wrote: > A few thousand such pages are usually left around due to the re-use of > L1 tables having been provided by the hypervisor (Dom0) or tool stack > (DomU). Set NX in the direct map variant, which needs to be done in L2 > due to the dual use of the re-used

[Xen-devel] [PATCH 2/2] x86-64/Xen: eliminate W+X mappings

2017-12-12 Thread Jan Beulich
A few thousand such pages are usually left around due to the re-use of L1 tables having been provided by the hypervisor (Dom0) or tool stack (DomU). Set NX in the direct map variant, which needs to be done in L2 due to the dual use of the re-used L1s. For x86_configure_nx() to actually do what it