vsyscall.h 703 B

123456789101112131415161718192021222324252627
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_X86_VSYSCALL_H
  3. #define _ASM_X86_VSYSCALL_H
  4. #include <linux/seqlock.h>
  5. #include <uapi/asm/vsyscall.h>
  6. #ifdef CONFIG_X86_VSYSCALL_EMULATION
  7. extern void map_vsyscall(void);
  8. extern void set_vsyscall_pgtable_user_bits(pgd_t *root);
  9. /*
  10. * Called on instruction fetch fault in vsyscall page.
  11. * Returns true if handled.
  12. */
  13. extern bool emulate_vsyscall(unsigned long error_code,
  14. struct pt_regs *regs, unsigned long address);
  15. #else
  16. static inline void map_vsyscall(void) {}
  17. static inline bool emulate_vsyscall(unsigned long error_code,
  18. struct pt_regs *regs, unsigned long address)
  19. {
  20. return false;
  21. }
  22. #endif
  23. #endif /* _ASM_X86_VSYSCALL_H */