diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2021-07-01 18:04:06 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2021-07-21 22:11:51 +0000 |
| commit | 855fb8944c5977abdd37ec2e1440e4332f5a6c4b (patch) | |
| tree | 7f0166018cf0f54b2fea3ff5c73c1a50560d5619 | |
| parent | bc28e9596c59b58fbbdbd9f97e42a0e0fbedb855 (diff) | |
Add sv_onexec_old() sysent hook for exec event
(cherry picked from commit 71ab344524a14f00f21c4c5638906d7b965d2b64)
| -rw-r--r-- | sys/kern/kern_exec.c | 2 | ||||
| -rw-r--r-- | sys/sys/sysent.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 01ec7de5d3c1..de1294ff6954 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1057,6 +1057,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); diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 8b0903f7dcc0..ff37806efd96 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -145,6 +145,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); |
