From nobody Fri Jul 04 14:56:17 2025 X-Original-To: desktop@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 4bYcCQ3mkJz61HRc for ; Fri, 04 Jul 2025 14:56:18 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bYcCQ0V9pz43bG for ; Fri, 04 Jul 2025 14:56:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751640978; 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: in-reply-to:in-reply-to:references:references; bh=wtcOIFd4mMJZX03UxKMAI0BBKOMcoyF26VWJFHZo6pU=; b=jzGxtXlWQPckf1lvc8oxNuFCfLo2UeuSZsfAkxUjCAXa0GdXMYbTK+QL/7Q9soDh2Uo/4F f21p+hqNeppuvoSoJ02NROA+5HS/vwDpJnUX6HiOEKnIsHEsDaIbl7j3Ei+p+xKfBFA6He m8tzfmyyQWRkKJkVgIl+ibAlhPq/JQYQUDK4KUqJKNJk5EaGbfCq7MSGJTyUKrPDfH/xBb NF0E0pMRIIVXS5ciQGHomFtU8NSuwcmVbZPd5C+UdVjxyrQh6ja2Sb86w6lWX6EXdboIbL 2qgpxfwtOKp4zpZmuYEV6aP9E0Yw9IYbsuZDBG7cutZQlAgSZEWOyMbQytpjCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751640978; 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: in-reply-to:in-reply-to:references:references; bh=wtcOIFd4mMJZX03UxKMAI0BBKOMcoyF26VWJFHZo6pU=; b=EhupEZg7HfVqKoYDOetHLKmLEtwiKVQJvpB2ENmCrkvxrpA2wg0DUioD+fPSXZ26JhWL4r WZ3D/ypPb3JhNKVRcCU4n33hVoqVk0tGpWodCI8PeyoYowuToRu+liCWqH4bpgA+kwVFqq 3NtN5WY4DP7lxsRjD0tR+qijjJ3O3a9jU+lE+Ahio9l7VuGLQOI/ZXt4cvdDxUxaG0DbM6 9xE9I1xWgsmjuXWg60rWHsWzIzhw2eHkIF8RcYbElJDxEC86PWvC/XxUUKMBoDSVUuvh93 9WzOfutCpRQvSkO+pCfc24Z+w+vTV5PEHaZRntB+Czaa4fHZouLfycpeEOzfGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1751640978; a=rsa-sha256; cv=none; b=U1CDirByfBopd1spp7bBHAYfkMe+zUNhHKgo3OkQMmxPq/SbHeXe9zSCU5DI0USKqW++au 8xmQ/MF69JlYURibGrOPiy3Y69pDu6a3vd62cca3arYiXoCVNDXVspMblKjzmIAIF+TLpT SjtGYqR7GQEfBUIvg35ZrnCDN/GaKuj8AP6ahJlASAVt6DbCc/fyvvZpYZyDrbTAiUnoXZ xufzlpeHi4KCoCcUFWxnTEO5QX4Tv0q+OO5FyUPs0Ohy0NKwstLlmY0lBHWSV0QKrGhps6 PZ7sH7XLWDUoE7IaU/MutHtRO08hktL4MGEiVEc1VAxnYxqEkTn8m/tf6DKFbA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4bYcCP6RXvzvgJ for ; Fri, 04 Jul 2025 14:56:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 564EuH7r055441 for ; Fri, 4 Jul 2025 14:56:17 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 564EuHDi055440 for desktop@FreeBSD.org; Fri, 4 Jul 2025 14:56:17 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: desktop@FreeBSD.org Subject: [Bug 258010] kqueue shortcoming for desktop usage Date: Fri, 04 Jul 2025 14:56:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: needs-patch, needs-qa X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Using and improving FreeBSD on the desktop List-Archive: https://lists.freebsd.org/archives/freebsd-desktop List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-desktop@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258010 --- Comment #5 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Df1f230439fa48581f40a57f095627f667= a9713c3 commit f1f230439fa48581f40a57f095627f667a9713c3 Author: Mark Johnston AuthorDate: 2025-07-03 20:07:45 +0000 Commit: Mark Johnston CommitDate: 2025-07-04 14:42:33 +0000 vfs: Initial revision of inotify Add an implementation of inotify_init(), inotify_add_watch(), inotify_rm_watch(), source-compatible with Linux. This provides functionality similar to kevent(2)'s EVFILT_VNODE, i.e., it lets applications monitor filesystem files for accesses. Compared to inotify, however, EVFILT_VNODE has the limitation of requiring the application to open the file to be monitored. This means that activity on a newly created file cannot be monitored reliably, and that a file descriptor per file in the hierarchy is required. inotify on the other hand allows a directory and its entries to be monitored at once. It introduces a new file descriptor type to which "watches" can be attached; a watch is a pseudo-file descriptor associated with a file or directory and a set of events to watch for. When a watched vnode is accessed, a description of the event is queued to the inotify descriptor, readable with read(2). Events for files in a watched directory include the file name. A watched vnode has its usecount bumped, so name cache entries originating from a watched directory are not evicted. Name cache entries are used to populate inotify events for files with a link in a watched directory. In particular, if a file is accessed with, say, read(2), an IN_ACCESS event will be generated for any watched hard link of the file. The inotify_add_watch_at() variant is included so that this functionality is available in capability mode; plain inotify_add_watch() is disallowed in capability mode. When a file in a nullfs mount is watched, the watch is attached to the lower vnode, such that accesses via either layer generate inotify events. Many thanks to Gleb Popov for testing this patch and finding lots of bugs. PR: 258010, 215011 Reviewed by: kib Tested by: arrowd MFC after: 3 months Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D50315 share/man/man4/rights.4 | 10 +- sys/bsm/audit_kevents.h | 1 + sys/conf/files | 1 + sys/fs/nullfs/null_subr.c | 4 + sys/fs/nullfs/null_vnops.c | 29 +- sys/kern/kern_resource.c | 21 + sys/kern/subr_capability.c | 4 + sys/kern/sys_generic.c | 35 +- sys/kern/syscalls.master | 15 + sys/kern/vfs_cache.c | 59 +++ sys/kern/vfs_default.c | 17 + sys/kern/vfs_inotify.c (new) | 1008 ++++++++++++++++++++++++++++++++++++++= ++++ sys/kern/vfs_subr.c | 7 +- sys/kern/vfs_vnops.c | 3 +- sys/kern/vnode_if.src | 21 + sys/sys/caprights.h | 2 + sys/sys/capsicum.h | 8 +- sys/sys/exterr_cat.h | 1 + sys/sys/file.h | 1 + sys/sys/inotify.h (new) | 146 ++++++ sys/sys/resourcevar.h | 4 + sys/sys/specialfd.h | 5 + sys/sys/user.h | 5 + sys/sys/vnode.h | 12 +- sys/tools/vnode_if.awk | 1 + 25 files changed, 1405 insertions(+), 15 deletions(-) --=20 You are receiving this mail because: You are on the CC list for the bug.=