• Rusty Russell's avatar
    lguest: Map switcher text R/O · e27d90e8
    Rusty Russell authored
    Pavel noted that lguest maps the switcher code executable and
    read-write.  This is a bad idea for any kernel text, but
    particularly for text mapped at a fixed address.
    
    Create two vmas, one for the text (PAGE_KERNEL_RX) and another
    for the stacks (PAGE_KERNEL).  Use VM_NO_GUARD to map them
    adjacent (as expected by the rest of the code).
    Reported-by: default avatarPavel Machek <pavel@ucw.cz>
    Tested-by: default avatarPavel Machek <pavel@ucw.cz>
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    e27d90e8
lguest.h 2.39 KB