• Baoquan He's avatar
    x86/boot/KASLR: Add two new functions for 1GB huge pages handling · 9b912485
    Baoquan He authored
    Introduce two new functions: parse_gb_huge_pages() and process_gb_huge_pages(),
    which handle a conflict between KASLR and huge pages of 1GB.
    
    These two functions will be used in the next patch:
    
    - parse_gb_huge_pages() is used to parse kernel command-line to get
      how many 1GB huge pages have been specified. A static global
      variable 'max_gb_huge_pages' is added to store the number.
    
    - process_gb_huge_pages() is used to skip as many 1GB huge pages
      as possible from the passed in memory region according to the
      specified number.
    Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: douly.fnst@cn.fujitsu.com
    Cc: fanc.fnst@cn.fujitsu.com
    Cc: indou.takao@jp.fujitsu.com
    Cc: keescook@chromium.org
    Cc: lcapitulino@redhat.com
    Cc: yasu.isimatu@gmail.com
    Link: http://lkml.kernel.org/r/20180625031656.12443-2-bhe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    9b912485
kaslr.c 23.2 KB