Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 2 | #ifndef _ASM_X86_VSYSCALL_H |
| 3 | #define _ASM_X86_VSYSCALL_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | |
David Woodhouse | 75da736 | 2006-09-16 12:15:48 -0700 | [diff] [blame] | 5 | #include <linux/seqlock.h> |
David Howells | af170c5 | 2012-12-14 22:37:13 +0000 | [diff] [blame] | 6 | #include <uapi/asm/vsyscall.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | |
Andy Lutomirski | 1ad83c8 | 2014-10-29 14:33:47 -0700 | [diff] [blame] | 8 | #ifdef CONFIG_X86_VSYSCALL_EMULATION |
Ingo Molnar | e402644 | 2008-01-30 13:32:39 +0100 | [diff] [blame] | 9 | extern void map_vsyscall(void); |
Andy Lutomirski | 85900ea | 2017-12-12 07:56:42 -0800 | [diff] [blame] | 10 | extern void set_vsyscall_pgtable_user_bits(pgd_t *root); |
Ingo Molnar | e402644 | 2008-01-30 13:32:39 +0100 | [diff] [blame] | 11 | |
Andy Lutomirski | 3ae3665 | 2011-08-10 11:15:32 -0400 | [diff] [blame] | 12 | /* |
| 13 | * Called on instruction fetch fault in vsyscall page. |
| 14 | * Returns true if handled. |
| 15 | */ |
| 16 | extern bool emulate_vsyscall(struct pt_regs *regs, unsigned long address); |
Andy Lutomirski | 1ad83c8 | 2014-10-29 14:33:47 -0700 | [diff] [blame] | 17 | #else |
| 18 | static inline void map_vsyscall(void) {} |
| 19 | static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address) |
| 20 | { |
| 21 | return false; |
| 22 | } |
| 23 | #endif |
Andy Lutomirski | 3ae3665 | 2011-08-10 11:15:32 -0400 | [diff] [blame] | 24 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 25 | #endif /* _ASM_X86_VSYSCALL_H */ |