Skip to content
  • Thomas Garnier's avatar
    x86/mm/KASLR: Increase BRK pages for KASLR memory randomization · fb754f95
    Thomas Garnier authored
    
    
    Default implementation expects 6 pages maximum are needed for low page
    allocations. If KASLR memory randomization is enabled, the worse case
    of e820 layout would require 12 pages (no large pages). It is due to the
    PUD level randomization and the variable e820 memory layout.
    
    This bug was found while doing extensive testing of KASLR memory
    randomization on different type of hardware.
    
    Signed-off-by: default avatarThomas Garnier <thgarnie@google.com>
    Cc: Aleksey Makarov <aleksey.makarov@linaro.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Baoquan He <bhe@redhat.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Christian Borntraeger <borntraeger@de.ibm.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: Dave Young <dyoung@redhat.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: Fabian Frederick <fabf@skynet.be>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Joerg Roedel <jroedel@suse.de>
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Lv Zheng <lv.zheng@intel.com>
    Cc: Mark Salter <msalter@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Rafael J . Wysocki <rafael.j.wysocki@intel.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Toshi Kani <toshi.kani@hp.com>
    Cc: kernel-hardening@lists.openwall.com
    Fixes: 021182e5 ("Enable KASLR for physical mapping memory regions")
    Link: http://lkml.kernel.org/r/1470762665-88032-2-git-send-email-thgarnie@google.com
    
    
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    fb754f95