Map the vsyscall page with _PAGE_USER
authorBorislav Petkov <bp@suse.de>
Thu, 4 Jan 2018 16:42:45 +0000 (17:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jan 2018 08:27:14 +0000 (09:27 +0100)
commit6dcf5491e01c3d1135497d0661bb5b35a126b9d8
tree9b325fdfe2bbcb95cb834e4a0e443e33e9c7cd6d
parent90191f71d74901ff88cd10039c03b98ca8a66c08
Map the vsyscall page with _PAGE_USER

This needs to happen early in kaiser_pagetable_walk(), before the
hierarchy is established so that _PAGE_USER permission can be really
set.

A proper fix would be to teach kaiser_pagetable_walk() to update those
permissions but the vsyscall page is the only exception here so ...

Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/entry/vsyscall/vsyscall_64.c
arch/x86/include/asm/vsyscall.h
arch/x86/mm/kaiser.c