Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/mips/elf_machdep.c
Show All 22 Lines | |||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
* | * | ||||
* from: src/sys/i386/i386/elf_machdep.c,v 1.20 2004/08/11 02:35:05 marcel | * from: src/sys/i386/i386/elf_machdep.c,v 1.20 2004/08/11 02:35:05 marcel | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_pax.h" | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/exec.h> | #include <sys/exec.h> | ||||
#include <sys/imgact.h> | #include <sys/imgact.h> | ||||
#include <sys/linker.h> | #include <sys/linker.h> | ||||
#include <sys/sysent.h> | #include <sys/sysent.h> | ||||
#include <sys/imgact_elf.h> | #include <sys/imgact_elf.h> | ||||
#include <sys/pax.h> | |||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/syscall.h> | #include <sys/syscall.h> | ||||
#include <sys/signalvar.h> | #include <sys/signalvar.h> | ||||
#include <sys/vnode.h> | #include <sys/vnode.h> | ||||
#include <vm/vm.h> | #include <vm/vm.h> | ||||
#include <vm/pmap.h> | #include <vm/pmap.h> | ||||
#include <vm/vm_param.h> | #include <vm/vm_param.h> | ||||
#include <machine/elf.h> | #include <machine/elf.h> | ||||
#include <machine/md_var.h> | #include <machine/md_var.h> | ||||
#include <machine/cache.h> | #include <machine/cache.h> | ||||
#ifdef __mips_n64 | #ifdef __mips_n64 | ||||
struct sysentvec elf64_freebsd_sysvec = { | struct sysentvec elf64_freebsd_sysvec = { | ||||
imp: Is there any reason to not include this file when PAX_ASLR is not defined? Seems safe enough… | |||||
Not Done Inline ActionsThat's possible. I'll make that change and see what comes of it. lattera-gmail.com: That's possible. I'll make that change and see what comes of it. | |||||
.sv_size = SYS_MAXSYSCALL, | .sv_size = SYS_MAXSYSCALL, | ||||
.sv_table = sysent, | .sv_table = sysent, | ||||
.sv_mask = 0, | .sv_mask = 0, | ||||
.sv_sigsize = 0, | .sv_sigsize = 0, | ||||
.sv_sigtbl = NULL, | .sv_sigtbl = NULL, | ||||
.sv_errsize = 0, | .sv_errsize = 0, | ||||
.sv_errtbl = NULL, | .sv_errtbl = NULL, | ||||
.sv_transtrap = NULL, | .sv_transtrap = NULL, | ||||
Show All 16 Lines | struct sysentvec elf64_freebsd_sysvec = { | ||||
.sv_setregs = exec_setregs, | .sv_setregs = exec_setregs, | ||||
.sv_fixlimit = NULL, | .sv_fixlimit = NULL, | ||||
.sv_maxssiz = NULL, | .sv_maxssiz = NULL, | ||||
.sv_flags = SV_ABI_FREEBSD | SV_LP64, | .sv_flags = SV_ABI_FREEBSD | SV_LP64, | ||||
.sv_set_syscall_retval = cpu_set_syscall_retval, | .sv_set_syscall_retval = cpu_set_syscall_retval, | ||||
.sv_fetch_syscall_args = cpu_fetch_syscall_args, | .sv_fetch_syscall_args = cpu_fetch_syscall_args, | ||||
.sv_syscallnames = syscallnames, | .sv_syscallnames = syscallnames, | ||||
.sv_schedtail = NULL, | .sv_schedtail = NULL, | ||||
.sv_pax_aslr_init = pax_aslr_init_vmspace, | |||||
}; | }; | ||||
static Elf64_Brandinfo freebsd_brand_info = { | static Elf64_Brandinfo freebsd_brand_info = { | ||||
.brand = ELFOSABI_FREEBSD, | .brand = ELFOSABI_FREEBSD, | ||||
.machine = EM_MIPS, | .machine = EM_MIPS, | ||||
.compat_3_brand = "FreeBSD", | .compat_3_brand = "FreeBSD", | ||||
.emul_path = NULL, | .emul_path = NULL, | ||||
.interp_path = "/libexec/ld-elf.so.1", | .interp_path = "/libexec/ld-elf.so.1", | ||||
Show All 40 Lines | struct sysentvec elf32_freebsd_sysvec = { | ||||
.sv_setregs = exec_setregs, | .sv_setregs = exec_setregs, | ||||
.sv_fixlimit = NULL, | .sv_fixlimit = NULL, | ||||
.sv_maxssiz = NULL, | .sv_maxssiz = NULL, | ||||
.sv_flags = SV_ABI_FREEBSD | SV_ILP32, | .sv_flags = SV_ABI_FREEBSD | SV_ILP32, | ||||
.sv_set_syscall_retval = cpu_set_syscall_retval, | .sv_set_syscall_retval = cpu_set_syscall_retval, | ||||
.sv_fetch_syscall_args = cpu_fetch_syscall_args, | .sv_fetch_syscall_args = cpu_fetch_syscall_args, | ||||
.sv_syscallnames = syscallnames, | .sv_syscallnames = syscallnames, | ||||
.sv_schedtail = NULL, | .sv_schedtail = NULL, | ||||
.sv_pax_aslr_init = pax_aslr_init_vmspace32, | |||||
}; | }; | ||||
static Elf32_Brandinfo freebsd_brand_info = { | static Elf32_Brandinfo freebsd_brand_info = { | ||||
.brand = ELFOSABI_FREEBSD, | .brand = ELFOSABI_FREEBSD, | ||||
.machine = EM_MIPS, | .machine = EM_MIPS, | ||||
.compat_3_brand = "FreeBSD", | .compat_3_brand = "FreeBSD", | ||||
.emul_path = NULL, | .emul_path = NULL, | ||||
.interp_path = "/libexec/ld-elf.so.1", | .interp_path = "/libexec/ld-elf.so.1", | ||||
▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines |
Is there any reason to not include this file when PAX_ASLR is not defined? Seems safe enough and would reduce the number of ifdefs this patch introduces significantly.