Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/linux/linux_sysvec.c
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | |||||
static int linux_fixup(uintptr_t *stack_base, | static int linux_fixup(uintptr_t *stack_base, | ||||
struct image_params *iparams); | struct image_params *iparams); | ||||
static int linux_fixup_elf(uintptr_t *stack_base, | static int linux_fixup_elf(uintptr_t *stack_base, | ||||
struct image_params *iparams); | struct image_params *iparams); | ||||
static void linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); | static void linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); | ||||
static void linux_exec_setregs(struct thread *td, | static void linux_exec_setregs(struct thread *td, | ||||
struct image_params *imgp, uintptr_t stack); | struct image_params *imgp, uintptr_t stack); | ||||
static int linux_on_exec_vmspace(struct proc *p, | |||||
struct image_params *imgp); | |||||
static int linux_copyout_strings(struct image_params *imgp, | static int linux_copyout_strings(struct image_params *imgp, | ||||
uintptr_t *stack_base); | uintptr_t *stack_base); | ||||
static bool linux_trans_osrel(const Elf_Note *note, int32_t *osrel); | static bool linux_trans_osrel(const Elf_Note *note, int32_t *osrel); | ||||
static void linux_vdso_install(void *param); | static void linux_vdso_install(void *param); | ||||
static void linux_vdso_deinstall(void *param); | static void linux_vdso_deinstall(void *param); | ||||
#define LINUX_T_UNKNOWN 255 | #define LINUX_T_UNKNOWN 255 | ||||
static int _bsd_to_linux_trapcode[] = { | static int _bsd_to_linux_trapcode[] = { | ||||
▲ Show 20 Lines • Show All 727 Lines • ▼ Show 20 Lines | struct sysentvec linux_sysvec = { | ||||
.sv_flags = SV_ABI_LINUX | SV_AOUT | SV_IA32 | SV_ILP32 | | .sv_flags = SV_ABI_LINUX | SV_AOUT | SV_IA32 | SV_ILP32 | | ||||
SV_SIG_DISCIGN | SV_SIG_WAITNDQ, | SV_SIG_DISCIGN | SV_SIG_WAITNDQ, | ||||
.sv_set_syscall_retval = linux_set_syscall_retval, | .sv_set_syscall_retval = linux_set_syscall_retval, | ||||
.sv_fetch_syscall_args = linux_fetch_syscall_args, | .sv_fetch_syscall_args = linux_fetch_syscall_args, | ||||
.sv_syscallnames = NULL, | .sv_syscallnames = NULL, | ||||
.sv_schedtail = linux_schedtail, | .sv_schedtail = linux_schedtail, | ||||
.sv_thread_detach = linux_thread_detach, | .sv_thread_detach = linux_thread_detach, | ||||
.sv_trap = NULL, | .sv_trap = NULL, | ||||
.sv_onexec = linux_on_exec, | .sv_onexec = linux_on_exec_vmspace, | ||||
.sv_onexit = linux_on_exit, | .sv_onexit = linux_on_exit, | ||||
.sv_ontdexit = linux_thread_dtor, | .sv_ontdexit = linux_thread_dtor, | ||||
.sv_setid_allowed = &linux_setid_allowed_query, | .sv_setid_allowed = &linux_setid_allowed_query, | ||||
}; | }; | ||||
INIT_SYSENTVEC(aout_sysvec, &linux_sysvec); | INIT_SYSENTVEC(aout_sysvec, &linux_sysvec); | ||||
struct sysentvec elf_linux_sysvec = { | struct sysentvec elf_linux_sysvec = { | ||||
.sv_size = LINUX_SYS_MAXSYSCALL, | .sv_size = LINUX_SYS_MAXSYSCALL, | ||||
Show All 22 Lines | struct sysentvec elf_linux_sysvec = { | ||||
.sv_set_syscall_retval = linux_set_syscall_retval, | .sv_set_syscall_retval = linux_set_syscall_retval, | ||||
.sv_fetch_syscall_args = linux_fetch_syscall_args, | .sv_fetch_syscall_args = linux_fetch_syscall_args, | ||||
.sv_syscallnames = NULL, | .sv_syscallnames = NULL, | ||||
.sv_shared_page_base = LINUX_SHAREDPAGE, | .sv_shared_page_base = LINUX_SHAREDPAGE, | ||||
.sv_shared_page_len = PAGE_SIZE, | .sv_shared_page_len = PAGE_SIZE, | ||||
.sv_schedtail = linux_schedtail, | .sv_schedtail = linux_schedtail, | ||||
.sv_thread_detach = linux_thread_detach, | .sv_thread_detach = linux_thread_detach, | ||||
.sv_trap = NULL, | .sv_trap = NULL, | ||||
.sv_onexec = linux_on_exec, | .sv_onexec = linux_on_exec_vmspace, | ||||
.sv_onexit = linux_on_exit, | .sv_onexit = linux_on_exit, | ||||
.sv_ontdexit = linux_thread_dtor, | .sv_ontdexit = linux_thread_dtor, | ||||
.sv_setid_allowed = &linux_setid_allowed_query, | .sv_setid_allowed = &linux_setid_allowed_query, | ||||
}; | }; | ||||
static int | |||||
linux_on_exec_vmspace(struct proc *p, struct image_params *imgp) | |||||
{ | |||||
linux_on_exec(p, imgp); | |||||
return (0); | |||||
} | |||||
static void | static void | ||||
linux_vdso_install(void *param) | linux_vdso_install(void *param) | ||||
{ | { | ||||
linux_szsigcode = (&_binary_linux_locore_o_end - | linux_szsigcode = (&_binary_linux_locore_o_end - | ||||
&_binary_linux_locore_o_start); | &_binary_linux_locore_o_start); | ||||
▲ Show 20 Lines • Show All 169 Lines • Show Last 20 Lines |