From owner-dev-commits-src-branches@freebsd.org Sun Jun 13 01:45:07 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 6EF446540E1; Sun, 13 Jun 2021 01:45:07 +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 4G2cpW27Cjz4jbv; Sun, 13 Jun 2021 01:45:07 +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 28D0918B41; Sun, 13 Jun 2021 01:45:07 +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 15D1j7SH051959; Sun, 13 Jun 2021 01:45:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15D1j7Wl051958; Sun, 13 Jun 2021 01:45:07 GMT (envelope-from git) Date: Sun, 13 Jun 2021 01:45:07 GMT Message-Id: <202106130145.15D1j7Wl051958@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: c1cbdaa22a33 - stable/13 - Fix tinderbox build after 1762f674ccb571e6 ktrace commit. 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: c1cbdaa22a3377715afd271df4fb5acdeab4bead Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 01:45:07 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c1cbdaa22a3377715afd271df4fb5acdeab4bead commit c1cbdaa22a3377715afd271df4fb5acdeab4bead Author: Mateusz Guzik AuthorDate: 2021-05-22 19:37:53 +0000 Commit: Konstantin Belousov CommitDate: 2021-06-13 01:22:33 +0000 Fix tinderbox build after 1762f674ccb571e6 ktrace commit. (cherry picked from commit 154f0ecc10abdd3c23d233bf85e292011a130583) --- sys/kern/kern_exec.c | 6 ++++-- sys/kern/vfs_vnops.c | 2 ++ sys/sys/ktrace.h | 9 +++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 2936e246f706..01ec7de5d3c1 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -398,7 +398,9 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p, static const char fexecv_proc_title[] = "(fexecv)"; imgp = &image_params; +#ifdef KTRACE kiop = NULL; +#endif /* * Lock the process and set the P_INEXEC flag to indicate that @@ -788,8 +790,6 @@ interpret: * we do not regain any tracing during a possible block. */ setsugid(p); - kiop = NULL; - #ifdef KTRACE kiop = ktrprocexec(p); #endif @@ -946,7 +946,9 @@ exec_fail: */ if (oldtextvp != NULL) vrele(oldtextvp); +#ifdef KTRACE ktr_io_params_free(kiop); +#endif pargs_drop(oldargs); pargs_drop(newargs); if (oldsigacts != NULL) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 9c3d261a25c4..95b6821bdff5 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -2372,11 +2372,13 @@ vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio, if ((uoff_t)uio->uio_offset + uio->uio_resid < lim) return (0); +#ifdef KTRACE if (!ktr_write || ktr_filesize_limit_signal) { PROC_LOCK(td->td_proc); kern_psignal(td->td_proc, SIGXFSZ); PROC_UNLOCK(td->td_proc); } +#endif return (EFBIG); } diff --git a/sys/sys/ktrace.h b/sys/sys/ktrace.h index 50030d002f97..1fcac8e0cd26 100644 --- a/sys/sys/ktrace.h +++ b/sys/sys/ktrace.h @@ -267,7 +267,16 @@ struct ktr_struct_array { #ifdef _KERNEL struct ktr_io_params; +#ifdef KTRACE struct vnode *ktr_get_tracevp(struct proc *, bool); +#else +static inline struct vnode * +ktr_get_tracevp(struct proc *p, bool ref) +{ + + return (NULL); +} +#endif void ktr_io_params_free(struct ktr_io_params *); void ktrnamei(char *); void ktrcsw(int, int, const char *);