Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/imgact.h
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | struct image_args { | ||||
char *fname_buf; /* pointer to optional malloc(M_TEMP) buffer */ | char *fname_buf; /* pointer to optional malloc(M_TEMP) buffer */ | ||||
int stringspace; /* space left in arg & env buffer */ | int stringspace; /* space left in arg & env buffer */ | ||||
int argc; /* count of argument strings */ | int argc; /* count of argument strings */ | ||||
int envc; /* count of environment strings */ | int envc; /* count of environment strings */ | ||||
int fd; /* file descriptor of the executable */ | int fd; /* file descriptor of the executable */ | ||||
}; | }; | ||||
struct image_params { | struct image_params { | ||||
struct proc *proc; /* our process struct */ | struct proc *proc; /* our process */ | ||||
struct label *execlabel; /* optional exec label */ | struct label *execlabel; /* optional exec label */ | ||||
struct vnode *vp; /* pointer to vnode of file to exec */ | struct vnode *vp; /* pointer to vnode of file to exec */ | ||||
struct vm_object *object; /* The vm object for this vp */ | struct vm_object *object; /* The vm object for this vp */ | ||||
struct vattr *attr; /* attributes of file */ | struct vattr *attr; /* attributes of file */ | ||||
const char *image_header; /* head of file to exec */ | const char *image_header; /* header of file to exec */ | ||||
unsigned long entry_addr; /* entry address of target executable */ | unsigned long entry_addr; /* entry address of target executable */ | ||||
unsigned long reloc_base; /* load address of image */ | unsigned long reloc_base; /* load address of image */ | ||||
char vmspace_destroyed; /* flag - we've blown away original vm space */ | |||||
#define IMGACT_SHELL 0x1 | |||||
#define IMGACT_BINMISC 0x2 | |||||
unsigned char interpreted; /* mask of interpreters that have run */ | |||||
char opened; /* flag - we have opened executable vnode */ | |||||
char *interpreter_name; /* name of the interpreter */ | char *interpreter_name; /* name of the interpreter */ | ||||
void *auxargs; /* ELF Auxinfo structure pointer */ | void *auxargs; /* ELF Auxinfo structure pointer */ | ||||
struct sf_buf *firstpage; /* first page that we mapped */ | struct sf_buf *firstpage; /* first page that we mapped */ | ||||
void *ps_strings; /* pointer to ps_string (user space) */ | void *ps_strings; /* pointer to ps_string (user space) */ | ||||
struct image_args *args; /* system call arguments */ | struct image_args *args; /* system call arguments */ | ||||
struct sysentvec *sysent; /* system entry vector */ | struct sysentvec *sysent; /* system entry vector */ | ||||
void *argv; /* pointer to argv (user space) */ | void *argv; /* pointer to argv (user space) */ | ||||
void *envv; /* pointer to envv (user space) */ | void *envv; /* pointer to envv (user space) */ | ||||
char *execpath; | char *execpath; | ||||
void *execpathp; | void *execpathp; | ||||
char *freepath; | char *freepath; | ||||
void *canary; | void *canary; | ||||
int canarylen; | int canarylen; | ||||
void *pagesizes; | void *pagesizes; | ||||
int pagesizeslen; | int pagesizeslen; | ||||
vm_prot_t stack_prot; | vm_prot_t stack_prot; | ||||
u_long stack_sz; | u_long stack_sz; | ||||
u_long eff_stack_sz; | u_long eff_stack_sz; | ||||
struct ucred *newcred; /* new credentials if changing */ | struct ucred *newcred; /* new credentials if changing */ | ||||
#define IMGACT_SHELL 0x1 | |||||
#define IMGACT_BINMISC 0x2 | |||||
unsigned char interpreted; /* mask of interpreters that have run */ | |||||
bool credential_setid; /* true if becoming setid */ | bool credential_setid; /* true if becoming setid */ | ||||
bool vmspace_destroyed; /* we've blown away original vm space */ | |||||
bool opened; /* we have opened executable vnode */ | |||||
bool textset; | bool textset; | ||||
u_int map_flags; | u_int map_flags; | ||||
}; | }; | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
struct sysentvec; | struct sysentvec; | ||||
struct thread; | struct thread; | ||||
struct vmspace; | struct vmspace; | ||||
Show All 26 Lines |