• Arnd Bergmann's avatar
    x86/KASLR: Use the right memcpy() implementation · 5b8b9cf7
    Arnd Bergmann authored
    The decompressor has its own implementation of the string functions,
    but has to include the right header to get those, while implicitly
    including linux/string.h may result in a link error:
    
      arch/x86/boot/compressed/kaslr.o: In function `choose_random_location':
      kaslr.c:(.text+0xf51): undefined reference to `_mmx_memcpy'
    
    This has appeared now as KASLR started using memcpy(), via:
    
    	d52e7d5a ("x86/KASLR: Parse all 'memmap=' boot option entries")
    
    Other files in the decompressor already do the same thing.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Acked-by: default avatarBaoquan He <bhe@redhat.com>
    Cc: Dave Jiang <dave.jiang@intel.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Garnier <thgarnie@google.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/20170530091446.1000183-1-arnd@arndb.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    5b8b9cf7
kaslr.c 18.6 KB