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

From: Ingo Molnar
Date: Tue Dec 12 2017 - 05:54:17 EST



* Jan Beulich <JBeulich@xxxxxxxx> wrote:

> >>> On 12.12.17 at 11:38, <mingo@xxxxxxxxxx> wrote:
> > * Jan Beulich <JBeulich@xxxxxxxx> 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] */
> >> copy_page(level2_kernel_pgt, l2);
> >>
> >> + /* Zap execute permission from the ident map. Due to the sharing of
> >> + * L1 entries we need to do this in the L2. */
> >
> > please use the customary (multi-line) comment style:
> >
> > /*
> > * Comment .....
> > * ...... goes here.
> > */
> >
> > specified in Documentation/CodingStyle.
>
> I would have but didn't because all other comments in this function
> use this (wrong) style. I've concluded that consistency is better
> here than matching the style doc. If the Xen maintainers tell me
> otherwise, I'll happily adjust the patch.

Then it should be cleaned up in a separate patch. The file is in arch/x86/ and
both Documentation/CodingStyle and Linus's position is pretty unambiguous on this,
there's no special exceptions for ugliness in arch/x86/ as far as I'm concerned.

Please guys fix this mess, NAK otherwise.

Thanks,

Ingo