Add sv_onexec_old() sysent hook for exec event
Unlike sv_onexec(), it is called from the old (pre-exec) sysentvec structure. The old vmspace for the process is still intact during the call. Reviewed by: dchagin, markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D30987
This commit is contained in:
parent
edcf1054d3
commit
71ab344524
@ -1064,6 +1064,8 @@ exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv)
|
||||
|
||||
sigfastblock_clear(td);
|
||||
umtx_exec(p);
|
||||
if (p->p_sysent->sv_onexec_old != NULL)
|
||||
p->p_sysent->sv_onexec_old(td);
|
||||
itimers_exec(p);
|
||||
if (sv->sv_onexec != NULL)
|
||||
sv->sv_onexec(p, imgp);
|
||||
|
@ -150,6 +150,7 @@ struct sysentvec {
|
||||
u_long *sv_hwcap2; /* Value passed in AT_HWCAP2. */
|
||||
const char *(*sv_machine_arch)(struct proc *);
|
||||
vm_offset_t sv_fxrng_gen_base;
|
||||
void (*sv_onexec_old)(struct thread *td);
|
||||
void (*sv_onexec)(struct proc *, struct image_params *);
|
||||
void (*sv_onexit)(struct proc *);
|
||||
void (*sv_ontdexit)(struct thread *td);
|
||||
|
Loading…
x
Reference in New Issue
Block a user