x86/KASLR: Use the right memcpy() implementation
authorArnd Bergmann <arnd@arndb.de>
Tue, 30 May 2017 09:14:17 +0000 (11:14 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 31 May 2017 05:59:45 +0000 (07:59 +0200)
commit5b8b9cf76add98e19ff8ceb4247c2920687591a0
tree03330eba950f6d1a2b714d4154945dc62794274f
parent8fcc9bc3eaa2ef8345e2b4b22e3a88804ac46337
x86/KASLR: Use the right memcpy() implementation

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:

d52e7d5a952c ("x86/KASLR: Parse all 'memmap=' boot option entries")

Other files in the decompressor already do the same thing.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Baoquan 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.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/boot/compressed/kaslr.c