Deleted Added
full compact
30c30
< __FBSDID("$FreeBSD: stable/10/sys/i386/linux/linux_sysvec.c 293495 2016-01-09 15:18:36Z dchagin $");
---
> __FBSDID("$FreeBSD: stable/10/sys/i386/linux/linux_sysvec.c 293514 2016-01-09 15:44:38Z dchagin $");
73a74
> #include <compat/linux/linux_vdso.h>
96,97c97,101
< extern char linux_sigcode[];
< extern int linux_szsigcode;
---
> static int linux_szsigcode;
> static vm_object_t linux_shared_page_obj;
> static char *linux_shared_page_mapping;
> extern char _binary_linux_locore_o_start;
> extern char _binary_linux_locore_o_end;
112a117,118
> static void linux_vdso_install(void *param);
> static void linux_vdso_deinstall(void *param);
201a208,211
> LINUX_VDSO_SYM_INTPTR(linux_sigcode);
> LINUX_VDSO_SYM_INTPTR(linux_rt_sigcode);
> LINUX_VDSO_SYM_INTPTR(linux_vsyscall);
>
257a268,270
> AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR,
> imgp->proc->p_sysent->sv_shared_page_base);
> AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO, linux_vsyscall);
402,405d414
<
<
< extern unsigned long linux_sznonrtsigcode;
<
480a490
> frame.sf_sc.uc_mcontext.sc_esp = regs->tf_esp;
518c528
< regs->tf_eip = p->p_sysent->sv_sigcode_base + linux_sznonrtsigcode;
---
> regs->tf_eip = linux_rt_sigcode;
608a619
> frame.sf_sc.sc_esp = regs->tf_esp;
637c648
< regs->tf_eip = p->p_sysent->sv_sigcode_base;
---
> regs->tf_eip = linux_sigcode;
953c964
< .sv_sigcode = linux_sigcode,
---
> .sv_sigcode = &_binary_linux_locore_o_start,
992c1003
< .sv_sigcode = linux_sigcode,
---
> .sv_sigcode = &_binary_linux_locore_o_start,
1018d1028
< INIT_SYSENTVEC(elf_sysvec, &elf_linux_sysvec);
1019a1030,1062
> static void
> linux_vdso_install(void *param)
> {
>
> linux_szsigcode = (&_binary_linux_locore_o_end -
> &_binary_linux_locore_o_start);
>
> if (linux_szsigcode > elf_linux_sysvec.sv_shared_page_len)
> panic("Linux invalid vdso size\n");
>
> __elfN(linux_vdso_fixup)(&elf_linux_sysvec);
>
> linux_shared_page_obj = __elfN(linux_shared_page_init)
> (&linux_shared_page_mapping);
>
> __elfN(linux_vdso_reloc)(&elf_linux_sysvec, LINUX_SHAREDPAGE);
>
> bcopy(elf_linux_sysvec.sv_sigcode, linux_shared_page_mapping,
> linux_szsigcode);
> elf_linux_sysvec.sv_shared_page_obj = linux_shared_page_obj;
> }
> SYSINIT(elf_linux_vdso_init, SI_SUB_EXEC, SI_ORDER_ANY,
> (sysinit_cfunc_t)linux_vdso_install, NULL);
>
> static void
> linux_vdso_deinstall(void *param)
> {
>
> __elfN(linux_shared_page_fini)(linux_shared_page_obj);
> };
> SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER_FIRST,
> (sysinit_cfunc_t)linux_vdso_deinstall, NULL);
>