]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - arch/x86/mm/dump_pagetables.c
x86/mm: Prevent kernel Oops in PTDUMP code with HIGHPTE=y
authorJoerg Roedel <jroedel@suse.de>
Tue, 17 Apr 2018 13:27:16 +0000 (15:27 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 17 Apr 2018 13:43:01 +0000 (15:43 +0200)
commitd6ef1f194b7569af8b8397876dc9ab07649d63cb
tree9d7bd7b181f1d7f32abb559812163b8eba076d8b
parent1340ccfa9a9afefdbab90d7935d4ed19817e37c2
x86/mm: Prevent kernel Oops in PTDUMP code with HIGHPTE=y

The walk_pte_level() function just uses __va to get the virtual address of
the PTE page, but that breaks when the PTE page is not in the direct
mapping with HIGHPTE=y.

The result is an unhandled kernel paging request at some random address
when accessing the current_kernel or current_user file.

Use the correct API to access PTE pages.

Fixes: fe770bf0310d ('x86: clean up the page table dumper and add 32-bit support')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Cc: jgross@suse.com
Cc: JBeulich@suse.com
Cc: hpa@zytor.com
Cc: aryabinin@virtuozzo.com
Cc: kirill.shutemov@linux.intel.com
Link: https://lkml.kernel.org/r/1523971636-4137-1-git-send-email-joro@8bytes.org
arch/x86/mm/dump_pagetables.c