diff options
author | Andy Lutomirski <luto@amacapital.net> | 2014-03-17 23:22:08 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2014-03-18 12:52:33 -0700 |
commit | b4b541a610c4db8643b36030ee5012203ca65778 (patch) | |
tree | 80019c3a48ec605144b5c88f147a46ff7869eb1a /arch/x86/vdso/vdso32-setup.c | |
parent | ef721987aef0cc0abba08c88810f2155f76b0b1f (diff) | |
download | linux-b4b541a610c4db8643b36030ee5012203ca65778.tar.gz linux-b4b541a610c4db8643b36030ee5012203ca65778.tar.bz2 linux-b4b541a610c4db8643b36030ee5012203ca65778.zip |
x86, vdso: Patch alternatives in the 32-bit VDSO
We need the alternatives mechanism for rdtsc_barrier() to work.
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Link: http://lkml.kernel.org/r/1395094933-14252-9-git-send-email-stefani@seibold.net
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/vdso/vdso32-setup.c')
-rw-r--r-- | arch/x86/vdso/vdso32-setup.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c index ab20c04b688a..e0fc767bcad3 100644 --- a/arch/x86/vdso/vdso32-setup.c +++ b/arch/x86/vdso/vdso32-setup.c @@ -112,24 +112,25 @@ void enable_sep_cpu(void) int __init sysenter_setup(void) { - void *syscall_page = (void *)get_zeroed_page(GFP_ATOMIC); - const void *vsyscall; - size_t vsyscall_len; + void *vdso_page = (void *)get_zeroed_page(GFP_ATOMIC); + const void *vdso; + size_t vdso_len; - vdso32_pages[0] = virt_to_page(syscall_page); + vdso32_pages[0] = virt_to_page(vdso_page); if (vdso32_syscall()) { - vsyscall = &vdso32_syscall_start; - vsyscall_len = &vdso32_syscall_end - &vdso32_syscall_start; + vdso = &vdso32_syscall_start; + vdso_len = &vdso32_syscall_end - &vdso32_syscall_start; } else if (vdso32_sysenter()){ - vsyscall = &vdso32_sysenter_start; - vsyscall_len = &vdso32_sysenter_end - &vdso32_sysenter_start; + vdso = &vdso32_sysenter_start; + vdso_len = &vdso32_sysenter_end - &vdso32_sysenter_start; } else { - vsyscall = &vdso32_int80_start; - vsyscall_len = &vdso32_int80_end - &vdso32_int80_start; + vdso = &vdso32_int80_start; + vdso_len = &vdso32_int80_end - &vdso32_int80_start; } - memcpy(syscall_page, vsyscall, vsyscall_len); + memcpy(vdso_page, vdso, vdso_len); + patch_vdso32(vdso_page, vdso_len); return 0; } |