mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 08:58:07 +00:00
85900ea515
Make VSYSCALLs work fully in PTI mode by mapping them properly to the user space visible page tables. [ tglx: Hide unused functions (Patch by Arnd Bergmann) ] Signed-off-by: Andy Lutomirski <luto@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: David Laight <David.Laight@aculab.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Juergen Gross <jgross@suse.com> Cc: Kees Cook <keescook@chromium.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org>
25 lines
635 B
C
25 lines
635 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_X86_VSYSCALL_H
|
|
#define _ASM_X86_VSYSCALL_H
|
|
|
|
#include <linux/seqlock.h>
|
|
#include <uapi/asm/vsyscall.h>
|
|
|
|
#ifdef CONFIG_X86_VSYSCALL_EMULATION
|
|
extern void map_vsyscall(void);
|
|
extern void set_vsyscall_pgtable_user_bits(pgd_t *root);
|
|
|
|
/*
|
|
* Called on instruction fetch fault in vsyscall page.
|
|
* Returns true if handled.
|
|
*/
|
|
extern bool emulate_vsyscall(struct pt_regs *regs, unsigned long address);
|
|
#else
|
|
static inline void map_vsyscall(void) {}
|
|
static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
|
|
{
|
|
return false;
|
|
}
|
|
#endif
|
|
|
|
#endif /* _ASM_X86_VSYSCALL_H */
|