From owner-dev-commits-src-all@freebsd.org Wed Jul 21 22:31:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6422766E2FA; Wed, 21 Jul 2021 22:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GVVfh2HCpz3kHy; Wed, 21 Jul 2021 22:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3665D261DB; Wed, 21 Jul 2021 22:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16LMV8hG089883; Wed, 21 Jul 2021 22:31:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16LMV8qN089882; Wed, 21 Jul 2021 22:31:08 GMT (envelope-from git) Date: Wed, 21 Jul 2021 22:31:08 GMT Message-Id: <202107212231.16LMV8qN089882@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 855fb8944c59 - stable/13 - Add sv_onexec_old() sysent hook for exec event MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 855fb8944c5977abdd37ec2e1440e4332f5a6c4b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2021 22:31:08 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=855fb8944c5977abdd37ec2e1440e4332f5a6c4b commit 855fb8944c5977abdd37ec2e1440e4332f5a6c4b Author: Konstantin Belousov AuthorDate: 2021-07-01 18:04:06 +0000 Commit: Konstantin Belousov 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);