summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2018-01-04 17:42:45 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-10 09:27:14 +0100
commit6dcf5491e01c3d1135497d0661bb5b35a126b9d8 (patch)
tree9b325fdfe2bbcb95cb834e4a0e443e33e9c7cd6d /arch/x86/include/asm
parent90191f71d74901ff88cd10039c03b98ca8a66c08 (diff)
downloadlinux-6dcf5491e01c3d1135497d0661bb5b35a126b9d8.tar.gz
linux-6dcf5491e01c3d1135497d0661bb5b35a126b9d8.tar.bz2
linux-6dcf5491e01c3d1135497d0661bb5b35a126b9d8.zip
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>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/vsyscall.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/vsyscall.h b/arch/x86/include/asm/vsyscall.h
index 6ba66ee79710..4865e10dbb55 100644
--- a/arch/x86/include/asm/vsyscall.h
+++ b/arch/x86/include/asm/vsyscall.h
@@ -12,12 +12,14 @@ extern void map_vsyscall(void);
* Returns true if handled.
*/
extern bool emulate_vsyscall(struct pt_regs *regs, unsigned long address);
+extern bool vsyscall_enabled(void);
#else
static inline void map_vsyscall(void) {}
static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
{
return false;
}
+static inline bool vsyscall_enabled(void) { return false; }
#endif
#endif /* _ASM_X86_VSYSCALL_H */