x86/boot: Clear direction and interrupt flags in startup_64
authorArvind Sankar <nivedita@alum.mit.edu>
Sun, 2 Feb 2020 17:13:50 +0000 (12:13 -0500)
committerArd Biesheuvel <ardb@kernel.org>
Sat, 22 Feb 2020 22:37:37 +0000 (23:37 +0100)
startup_32 already clears these flags on entry, do it in startup_64 as
well for consistency.

The direction flag in particular is not specified to be cleared in the
boot protocol documentation, and we currently call into C code
(paging_prepare) without explicitly clearing it.

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

index 27eb2a6..69cc6c6 100644 (file)
@@ -264,6 +264,9 @@ SYM_CODE_START(startup_64)
         * and command line.
         */
 
+       cld
+       cli
+
        /* Setup data segments. */
        xorl    %eax, %eax
        movl    %eax, %ds