x86, boot: Skip relocs when load address unchanged
authorKees Cook <keescook@chromium.org>
Fri, 16 Jan 2015 00:51:46 +0000 (16:51 -0800)
committerJiri Slaby <jslaby@suse.cz>
Thu, 29 Jan 2015 14:45:05 +0000 (15:45 +0100)
commit301ca855ac7feea569284adcf3dfe1bd760fe5b7
tree4dc5311c01e35c6f11a1d7d34285fba11f826e34
parent31f7649d1538ce063cf48af05704ab7b9a0c8fbf
x86, boot: Skip relocs when load address unchanged

commit f285f4a21c3253887caceed493089ece17579d59 upstream.

On 64-bit, relocation is not required unless the load address gets
changed. Without this, relocations do unexpected things when the kernel
is above 4G.

Reported-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Thomas D. <whissi@whissi.de>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Junjie Mao <eternal.n08@gmail.com>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/20150116005146.GA4212@www.outflux.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/x86/boot/compressed/misc.c