From nobody Sat Nov 01 00:45:09 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cyzdy2C3lz6FWpP; Sat, 01 Nov 2025 00:45:10 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cyzdx6QPgz3hbN; Sat, 01 Nov 2025 00:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761957909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zJ6BskJ7s1TxdiWsR/ydDC6qvdee4+V8eFL6uGuXgMQ=; b=KNLD9iDEdQWcaEphfcHkGT5vZJ9sujrP/SnJ6o8SNP1mfQkD28iGxpdxqW8N9Vgjnpob1A szL6jwaWABbdjo64XhrUCN9DgcVtvJEhxhVA0o61LKUOLJFuuOf6eA7Q2x56XA3f3/wT67 bEEk1Xw7VByI6VHEnoPF9eBDnegGhqRSYx05eJeWGheWhme5SowKzqqgJ+yHdjmrDU80bB QwKnJ3EgkllEwZ8/kEUXfYezXE7z8AAZAXdXGUqAI5vSEQ06USObmiVCGqJqPHdiSt+ggW Cb7Wc2ReWgMWjvmt/Xi3JtKkGaPqPqnRw0/QlLXHMKqGPVPQyHTdr6NpC6Eh5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761957909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zJ6BskJ7s1TxdiWsR/ydDC6qvdee4+V8eFL6uGuXgMQ=; b=OqCAIBBScZh+9kLHgQhKxvYH09n8gxeCsSJwe5OD3mOM4KeF9WExVy3SOtY1bWkmE82YSs t5LCyx5LdgOS0Rio0TN8Hn7gBIRlXRs0bBh2BO8YalE9hU7vwvAuMkWP77Xc+GNv8ZSJ1q crfAB5mCq8S77p7OCmEgH+YxY17whprq3PAXnVnJIGQvFFNgTjmpjRkEkHy8lcmn38nmKb 0UlN33AV1NflonxxmwAK7LwFKnETD5JPxz3kCm12PspFBH/5jk1wex/EeFb4cqi0KCtiW8 y3dghQVGYh/Lf6s+IkXf68FHQ6zzCIg1NTAGIgOS5Co26UdoW0F9KwI4tVw40A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761957909; a=rsa-sha256; cv=none; b=oHL4c5Sr3Hh3cc54k4SShuy9uEoropaY4Hmm1wgMDhvh0M/WGeuNT1NXAlVAn4s1TD0hhN 6JO/9HHpcNSDGBwqd7NamOQZNVNK7zqOoegT5U/FS4BWbP3PW6jHoLPCUu0bC/IbcCrurP 0YZEYnvmB91LNnodCDrumnsHiZco5PKPblGDiqOwDpX/ticf0K3iJ2awkG7Q2CWTKm1QTn xret2nIPumceGbuxeiNRUaj9xaPT2lt5BQQlYb+9HS4ZUW29dAMO+x8RmHDVuwqQQSPf1p 5wYouQj2Pinohxy2OB8JB2bQCmNugyhmzGvtUU9u/ZLRMY0DXr2Arh+4ue7DUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cyzdx5pxVz1bR; Sat, 01 Nov 2025 00:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5A10j9Wc000913; Sat, 1 Nov 2025 00:45:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5A10j96s000910; Sat, 1 Nov 2025 00:45:09 GMT (envelope-from git) Date: Sat, 1 Nov 2025 00:45:09 GMT Message-Id: <202511010045.5A10j96s000910@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: b7b6d45008fd - stable/15 - kqueue: handle copy for vnode filters List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org 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/15 X-Git-Reftype: branch X-Git-Commit: b7b6d45008fdee87477f041a9f220150523f3a7b Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b7b6d45008fdee87477f041a9f220150523f3a7b commit b7b6d45008fdee87477f041a9f220150523f3a7b Author: Konstantin Belousov AuthorDate: 2025-08-23 12:06:42 +0000 Commit: Konstantin Belousov CommitDate: 2025-11-01 00:43:14 +0000 kqueue: handle copy for vnode filters (cherry picked from commit 6b71c4ff698e1ba2266a85ff2ad89f2c2a8a16de) --- sys/kern/vfs_subr.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 57732ddab7d9..24210b63aaf5 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -6609,24 +6609,28 @@ static int filt_vfsvnode(struct knote *kn, long hint); static void filt_vfsdetach(struct knote *kn); static int filt_vfsdump(struct proc *p, struct knote *kn, struct kinfo_knote *kin); +static int filt_vfscopy(struct knote *kn, struct proc *p1); static const struct filterops vfsread_filtops = { .f_isfd = 1, .f_detach = filt_vfsdetach, .f_event = filt_vfsread, .f_userdump = filt_vfsdump, + .f_copy = filt_vfscopy, }; static const struct filterops vfswrite_filtops = { .f_isfd = 1, .f_detach = filt_vfsdetach, .f_event = filt_vfswrite, .f_userdump = filt_vfsdump, + .f_copy = filt_vfscopy, }; static const struct filterops vfsvnode_filtops = { .f_isfd = 1, .f_detach = filt_vfsdetach, .f_event = filt_vfsvnode, .f_userdump = filt_vfsdump, + .f_copy = filt_vfscopy, }; static void @@ -6810,6 +6814,16 @@ filt_vfsdump(struct proc *p, struct knote *kn, struct kinfo_knote *kin) return (0); } +static int +filt_vfscopy(struct knote *kn, struct proc *p1) +{ + struct vnode *vp; + + vp = (struct vnode *)kn->kn_hook; + vhold(vp); + return (0); +} + int vfs_read_dirent(struct vop_readdir_args *ap, struct dirent *dp, off_t off) {