Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1291984

Re: 4.4-rc5: ugly warn on: 5 W+X pages found

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject Re: 4.4-rc5: ugly warn on: 5 W+X pages found
Date 2015-12-15 10:50 +0100
Message-ID <qFUp3-2e3-11@gated-at.bofh.it> (permalink)
References (4 earlier) <qFGP9-1UU-43@gated-at.bofh.it> <qFHUS-2Aa-7@gated-at.bofh.it> <qFIxA-34I-25@gated-at.bofh.it> <qFIQW-3c1-15@gated-at.bofh.it> <qFJN0-3NK-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon 2015-12-14 14:25:10, Andy Lutomirski wrote:
> On Mon, Dec 14, 2015 at 1:24 PM, Arjan van de Ven <arjan@linux.intel.com> wrote:
> >
> >> That's weird.  The only API to do that seems to be manually setting
> >> kmap_prot to _PAGE_KERNEL_EXEC, and nothing does that.  (Why is
> >> kmap_prot a variable on x86 at all?  It has exactly one writer, and
> >> that's the code that initializes it in the first place.  Shouldn't we
> >> #define kmap_prot _PAGE_KERNEL?
> >
> >
> > iirc it changes based on runtime detection of NX capability
> >
> 
> Maybe it did, but if it still does, I can't find the code.
> 
> What *does* change is __supported_pte_mask.  If we're willing to make
> disable_nx work a little less well, we could try to initialize
> __supported_pte_mask from the very beginning.  (We currently seem to
> detect and enable NX even before we enable paging.)  I suspect that
> Pavel is seeing a kmap mapping left over from so early that it didn't
> have NX set (killed by massage_pgprot).

I tried applying:

[PATCH 1/2] x86_32/mm: Set NX in __supported_pte_mask before enabling
paging

but I still get

[    2.685402] ------------[ cut here ]------------
[    2.688649] WARNING: CPU: 0 PID: 1 at
arch/x86/mm/dump_pagetables.c:225 note_
page+0x5ec/0x790()
[    2.691897] x86/mm: Found insecure W+X mapping at address
ffe69000/0xffe69000
[    2.695090] Modules linked in:

Best regards,
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

4.4-rc5: ugly warn on: 5 W+X pages found Pavel Machek <pavel@ucw.cz> - 2015-12-14 09:10 +0100
  Re: 4.4-rc5: ugly warn on: 5 W+X pages found Borislav Petkov <bp@alien8.de> - 2015-12-14 10:00 +0100
    Re: 4.4-rc5: ugly warn on: 5 W+X pages found Pavel Machek <pavel@ucw.cz> - 2015-12-14 10:10 +0100
      Re: 4.4-rc5: ugly warn on: 5 W+X pages found Borislav Petkov <bp@alien8.de> - 2015-12-14 10:20 +0100
      Re: 4.4-rc5: ugly warn on: 5 W+X pages found Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-14 20:20 +0100
        Re: 4.4-rc5: ugly warn on: 5 W+X pages found Pavel Machek <pavel@ucw.cz> - 2015-12-14 21:30 +0100
          Re: 4.4-rc5: ugly warn on: 5 W+X pages found Andy Lutomirski <luto@amacapital.net> - 2015-12-14 22:10 +0100
            Re: 4.4-rc5: ugly warn on: 5 W+X pages found Arjan van de Ven <arjan@linux.intel.com> - 2015-12-14 22:30 +0100
              Re: 4.4-rc5: ugly warn on: 5 W+X pages found Andy Lutomirski <luto@amacapital.net> - 2015-12-14 23:30 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Pavel Machek <pavel@ucw.cz> - 2015-12-15 10:50 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-15 18:50 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Borislav Petkov <bp@alien8.de> - 2015-12-15 19:40 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-15 20:10 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Borislav Petkov <bp@alien8.de> - 2015-12-15 20:20 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Andy Lutomirski <luto@amacapital.net> - 2015-12-15 19:50 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-15 20:10 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Pavel Machek <pavel@ucw.cz> - 2015-12-15 22:00 +0100
                4.4.-rc5: lguest causes ugly warn on: 5 W+X pages found Pavel Machek <pavel@ucw.cz> - 2015-12-15 22:20 +0100
                Re: 4.4.-rc5: lguest causes ugly warn on: 5 W+X pages found Rusty Russell <rusty@rustcorp.com.au> - 2015-12-16 03:30 +0100
                Re: 4.4.-rc5: lguest causes ugly warn on: 5 W+X pages found Pavel Machek <pavel@ucw.cz> - 2015-12-16 09:20 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Borislav Petkov <bp@alien8.de> - 2015-12-15 22:40 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Pavel Machek <pavel@ucw.cz> - 2015-12-15 23:10 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Borislav Petkov <bp@alien8.de> - 2015-12-15 23:20 +0100
              Re: 4.4-rc5: ugly warn on: 5 W+X pages found Pavel Machek <pavel@ucw.cz> - 2015-12-15 09:00 +0100
                [PATCH 1/2] x86_32/mm: Set NX in __supported_pte_mask before enabling paging Andy Lutomirski <luto@kernel.org> - 2015-12-15 09:10 +0100
                [PATCH 2/2] x86/mm: Make kmap_prot into a #define Andy Lutomirski <luto@kernel.org> - 2015-12-15 09:10 +0100
                [PATCH 0/2] x86/mm: A _PAGE_NX fixlet and a kmap cleanup Andy Lutomirski <luto@kernel.org> - 2015-12-15 09:10 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Arjan van de Ven <arjan@linux.intel.com> - 2015-12-15 14:40 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Pavel Machek <pavel@ucw.cz> - 2015-12-15 15:10 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found "H. Peter Anvin" <hpa@zytor.com> - 2015-12-15 17:30 +0100
                Re: 4.4-rc5: ugly warn on: 5 W+X pages found Pavel Machek <pavel@ucw.cz> - 2015-12-15 18:50 +0100
  Re: 4.4-rc5: ugly warn on: 5 W+X pages found Pavel Machek <pavel@ucw.cz> - 2015-12-14 13:40 +0100

csiph-web