Date: Wed, 21 Jul 2021 22:31:08 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 855fb8944c59 - stable/13 - Add sv_onexec_old() sysent hook for exec event Message-ID: <202107212231.16LMV8qN089882@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=855fb8944c5977abdd37ec2e1440e4332f5a6c4b commit 855fb8944c5977abdd37ec2e1440e4332f5a6c4b Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-07-01 18:04:06 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-07-21 22:11:51 +0000 Add sv_onexec_old() sysent hook for exec event (cherry picked from commit 71ab344524a14f00f21c4c5638906d7b965d2b64) --- sys/kern/kern_exec.c | 2 ++ sys/sys/sysent.h | 1 + 2 files changed, 3 insertions(+) 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107212231.16LMV8qN089882>