From owner-dev-commits-src-all@freebsd.org Sat May 22 19:53:47 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 675E86366A7; Sat, 22 May 2021 19:53:47 +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 4FnZ0q2Nlhz3kyN; Sat, 22 May 2021 19:53:47 +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 39FEB2506; Sat, 22 May 2021 19:53:47 +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 14MJrl2Q026359; Sat, 22 May 2021 19:53:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14MJrlx7026358; Sat, 22 May 2021 19:53:47 GMT (envelope-from git) Date: Sat, 22 May 2021 19:53:47 GMT Message-Id: <202105221953.14MJrlx7026358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 48235c377f96 - main - Fix a braino in previous. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48235c377f960050e9129aa847d7d73019561c82 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: Sat, 22 May 2021 19:53:47 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=48235c377f960050e9129aa847d7d73019561c82 commit 48235c377f960050e9129aa847d7d73019561c82 Author: Mateusz Guzik AuthorDate: 2021-05-22 19:48:31 +0000 Commit: Mateusz Guzik CommitDate: 2021-05-22 19:53:40 +0000 Fix a braino in previous. Instead of trying to partially ifdef out ktrace handling, define the missing identifier to 0. Without this fix lack of ktrace in the kernel also means there is no SIGXFSZ signal delivery. --- sys/kern/vfs_vnops.c | 2 -- sys/sys/ktrace.h | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 7f5275cf6b28..9e45d1820eec 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -2371,13 +2371,11 @@ 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 5f8a782cd7e5..283a95c36d6c 100644 --- a/sys/sys/ktrace.h +++ b/sys/sys/ktrace.h @@ -308,8 +308,12 @@ void ktrcapfail(enum ktr_cap_fail_type, const cap_rights_t *, #define ktrstat_error(s, error) \ ktrstruct_error("stat", (s), sizeof(struct stat), error) extern u_int ktr_geniosize; +#ifdef KTRACE extern int ktr_filesize_limit_signal; #else +#define ktr_filesize_limit_signal 0 +#endif +#else #include