]> git.baikalelectronics.ru Git - kernel.git/commit
x86/boot: Reload GDTR after copying to the end of the buffer
authorArvind Sankar <nivedita@alum.mit.edu>
Sun, 2 Feb 2020 17:13:49 +0000 (12:13 -0500)
committerArd Biesheuvel <ardb@kernel.org>
Sat, 22 Feb 2020 22:37:37 +0000 (23:37 +0100)
commitd0039b2dceb3c3a4fac7b6ac527c6b1daf5819b2
tree1c4da502fc90d840e70c0db0ad691554b06d6922
parentc7430babc982f0a767d506be2947ae2a78971f0d
x86/boot: Reload GDTR after copying to the end of the buffer

The GDT may get overwritten during the copy or during extract_kernel,
which will cause problems if any segment register is touched before the
GDTR is reloaded by the decompressed kernel. For safety update the GDTR
to point to the GDT within the copied kernel.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200202171353.3736319-4-nivedita@alum.mit.edu
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/x86/boot/compressed/head_64.S