Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/imgact_aout.c
Show All 21 Lines | |||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
*/ | */ | ||||
#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/exec.h> | #include <sys/exec.h> | ||||
#include <sys/imgact.h> | #include <sys/imgact.h> | ||||
#include <sys/imgact_aout.h> | #include <sys/imgact_aout.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/limits.h> | #include <sys/limits.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/pax.h> | |||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/racct.h> | #include <sys/racct.h> | ||||
#include <sys/resourcevar.h> | #include <sys/resourcevar.h> | ||||
#include <sys/signalvar.h> | #include <sys/signalvar.h> | ||||
#include <sys/syscall.h> | #include <sys/syscall.h> | ||||
#include <sys/sysent.h> | #include <sys/sysent.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/vnode.h> | #include <sys/vnode.h> | ||||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | struct sysentvec aout_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_AOUT | SV_IA32 | SV_ILP32, | .sv_flags = SV_ABI_FREEBSD | SV_AOUT | SV_IA32 | 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, | ||||
#ifdef PAX_ASLR | |||||
.sv_pax_aslr_init = pax_aslr_init_vmspace, | |||||
#endif | |||||
}; | }; | ||||
#elif defined(__amd64__) | #elif defined(__amd64__) | ||||
#define AOUT32_USRSTACK 0xbfc00000 | #define AOUT32_USRSTACK 0xbfc00000 | ||||
#define AOUT32_PS_STRINGS \ | #define AOUT32_PS_STRINGS \ | ||||
(AOUT32_USRSTACK - sizeof(struct freebsd32_ps_strings)) | (AOUT32_USRSTACK - sizeof(struct freebsd32_ps_strings)) | ||||
#define AOUT32_MINUSER FREEBSD32_MINUSER | #define AOUT32_MINUSER FREEBSD32_MINUSER | ||||
Show All 28 Lines | struct sysentvec aout_sysvec = { | ||||
.sv_copyout_strings = freebsd32_copyout_strings, | .sv_copyout_strings = freebsd32_copyout_strings, | ||||
.sv_setregs = ia32_setregs, | .sv_setregs = ia32_setregs, | ||||
.sv_fixlimit = ia32_fixlimit, | .sv_fixlimit = ia32_fixlimit, | ||||
.sv_maxssiz = &ia32_maxssiz, | .sv_maxssiz = &ia32_maxssiz, | ||||
.sv_flags = SV_ABI_FREEBSD | SV_AOUT | SV_IA32 | SV_ILP32, | .sv_flags = SV_ABI_FREEBSD | SV_AOUT | SV_IA32 | SV_ILP32, | ||||
.sv_set_syscall_retval = ia32_set_syscall_retval, | .sv_set_syscall_retval = ia32_set_syscall_retval, | ||||
.sv_fetch_syscall_args = ia32_fetch_syscall_args, | .sv_fetch_syscall_args = ia32_fetch_syscall_args, | ||||
.sv_syscallnames = freebsd32_syscallnames, | .sv_syscallnames = freebsd32_syscallnames, | ||||
#ifdef PAX_ASLR | |||||
.sv_pax_aslr_init = pax_aslr_init_vmspace32, | |||||
#endif | |||||
}; | }; | ||||
#else | #else | ||||
#error "Port me" | #error "Port me" | ||||
#endif | #endif | ||||
static int | static int | ||||
aout_fixup(register_t **stack_base, struct image_params *imgp) | aout_fixup(register_t **stack_base, struct image_params *imgp) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 190 Lines • Show Last 20 Lines |