]> git.baikalelectronics.ru Git - kernel.git/commit
x86/boot/compressed/64: Fix trampoline page table address calculation
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fri, 18 May 2018 10:35:22 +0000 (13:35 +0300)
committerIngo Molnar <mingo@kernel.org>
Sat, 19 May 2018 09:56:57 +0000 (11:56 +0200)
commit69c08e69a0f9a6e56bfcf8ad5739444015b0a639
treefae77b305463b1f1575cc837bb8dd8aee79c0650
parent4df37d93289556a0492b869289bf7dfc99f1ed94
x86/boot/compressed/64: Fix trampoline page table address calculation

Hugh noticied that we calculate the address of the trampoline page table
incorrectly in cleanup_trampoline().

TRAMPOLINE_32BIT_PGTABLE_OFFSET has to be divided by sizeof(unsigned long),
since trampoline_32bit is an 'unsigned long' pointer.

TRAMPOLINE_32BIT_PGTABLE_OFFSET is zero so the bug doesn't have a
visible effect.

Reported-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: 4d1e7c46a3da ("x86/boot/compressed/64: Prepare new top-level page table for trampoline")
Link: http://lkml.kernel.org/r/20180518103528.59260-2-kirill.shutemov@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/boot/compressed/pgtable_64.c