1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 21965aae3SH. Peter Anvin #ifndef _ASM_X86_VDSO_H 31965aae3SH. Peter Anvin #define _ASM_X86_VDSO_H 4bb898558SAl Viro 59e6f450fSAndy Lutomirski #include <asm/page_types.h> 69e6f450fSAndy Lutomirski #include <linux/linkage.h> 76f121e54SAndy Lutomirski #include <linux/init.h> 89e6f450fSAndy Lutomirski 96f121e54SAndy Lutomirski #ifndef __ASSEMBLER__ 109e6f450fSAndy Lutomirski 11a62c34bdSAndy Lutomirski #include <linux/mm_types.h> 12a62c34bdSAndy Lutomirski 136f121e54SAndy Lutomirski struct vdso_image { 146f121e54SAndy Lutomirski void *data; 156f121e54SAndy Lutomirski unsigned long size; /* Always a multiple of PAGE_SIZE */ 16a62c34bdSAndy Lutomirski 176f121e54SAndy Lutomirski unsigned long alt, alt_len; 188382c668SSean Christopherson unsigned long extable_base, extable_len; 198382c668SSean Christopherson const void *extable; 209e6f450fSAndy Lutomirski 21e6577a7cSAndy Lutomirski long sym_vvar_start; /* Negative offset to the vvar area */ 2218d0a6fdSAndy Lutomirski 23e6577a7cSAndy Lutomirski long sym_vvar_page; 24dac16fbaSAndy Lutomirski long sym_pvclock_page; 2590b20432SVitaly Kuznetsov long sym_hvclock_page; 26550a77a7SDmitry Safonov long sym_timens_page; 27e6577a7cSAndy Lutomirski long sym_VDSO32_NOTE_MASK; 28e6577a7cSAndy Lutomirski long sym___kernel_sigreturn; 29e6577a7cSAndy Lutomirski long sym___kernel_rt_sigreturn; 30e6577a7cSAndy Lutomirski long sym___kernel_vsyscall; 318242c6c8SAndy Lutomirski long sym_int80_landing_pad; 32c5c87812SGabriel Krisman Bertazi long sym_vdso32_sigreturn_landing_pad; 33c5c87812SGabriel Krisman Bertazi long sym_vdso32_rt_sigreturn_landing_pad; 346f121e54SAndy Lutomirski }; 356f121e54SAndy Lutomirski 366f121e54SAndy Lutomirski #ifdef CONFIG_X86_64 376f121e54SAndy Lutomirski extern const struct vdso_image vdso_image_64; 386f121e54SAndy Lutomirski #endif 396f121e54SAndy Lutomirski 4083a44a4fSMasahiro Yamada #ifdef CONFIG_X86_X32_ABI 416f121e54SAndy Lutomirski extern const struct vdso_image vdso_image_x32; 426f121e54SAndy Lutomirski #endif 439e6f450fSAndy Lutomirski 44bb898558SAl Viro #if defined CONFIG_X86_32 || defined CONFIG_COMPAT 450a6d1fa0SAndy Lutomirski extern const struct vdso_image vdso_image_32; 46bb898558SAl Viro #endif 47bb898558SAl Viro 48*4c382d72SBrian Gerst extern int __init init_vdso_image(const struct vdso_image *image); 49b4b541a6SAndy Lutomirski 502eefd878SDmitry Safonov extern int map_vdso_once(const struct vdso_image *image, unsigned long addr); 512eefd878SDmitry Safonov 528382c668SSean Christopherson extern bool fixup_vdso_exception(struct pt_regs *regs, int trapnr, 538382c668SSean Christopherson unsigned long error_code, 548382c668SSean Christopherson unsigned long fault_addr); 559e6f450fSAndy Lutomirski #endif /* __ASSEMBLER__ */ 569e6f450fSAndy Lutomirski 571965aae3SH. Peter Anvin #endif /* _ASM_X86_VDSO_H */ 58