From nobody Mon Jun 1 18:42:52 2026 X-Original-To: dev-commits-src-main@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 4gTjWc5ghfz6gWYY for ; Mon, 01 Jun 2026 18:42:52 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gTjWc3wkzz3JB2 for ; Mon, 01 Jun 2026 18:42:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780339372; 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=x9NGo8QjMuBVR8fPkBhM6hz+L4rOKMmLSGxALM/SPAY=; b=NkLLJxE8fwt7yzixHP9Xk/6gqfNkCzlRr6S+suz/+frVuOvvcjgt2mvSEvzuugLG+HI2R4 imsoo3w5vK8vPVhDWB192luuqhvSQXnLJE9Zva8GYte4duQcUJwkjcf3prDqcJjlQcMRg2 A+7tBH/RjiVnMjkD0p1/CFme3RO5jhZXKfUsiAJNzr+ewFm4bR9mb1eqMV1CRSG3ySBpFq culIwMcHLykr/o23tOuxmtHtwgPOge/xRhSHD8XfV3kqQHbrx2IrVT4w4l5WgYy44gVcuV z6AhQu/l4ZJOPb6/hrySlYYi+1cZYI8vu+KsgOJBUbSLE7nzOOZapA7uk47rag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780339372; a=rsa-sha256; cv=none; b=Zc0J3WKo/mU03sR4gQMmSOGgnG6+mnafLfVlnfG3IanDrGAvpn6t6a/ayM3iltdKt10mjt /3tNSfJ8RFVZK5up4oysL//sjcSvpYQ2upT0gBvwQABAXrKWBbxAYJTAlNBMbDp/Uh31kC EcQYKG3jjhpfafAGbBIA20GEjKENp0cU9xllSFwur+Eofk9Y9fREGimi9fdN3cfCchDrzv vqgjmwGBN8iOTiZkvchn49aFoSHs2N4lCZlZdXol04xnKtTxla6n5vxfCMMbRrWkWQ9sos zRGQBeXmI+wUTLTa825Rw7L5kUvkK/VhhfOYJVIAU+0FzlTfTjtHkDek+sWeng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780339372; 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=x9NGo8QjMuBVR8fPkBhM6hz+L4rOKMmLSGxALM/SPAY=; b=Kq3bF3//HhKRDmqwtGKNSTF4JEv1RyvcHfN973jgZnceaRPKOAq+5/CIPFYjiQN94PyXPx 90LbqPrAmwpwRmeDOHa4TXMCm+ywrSU/Yr3+qpCl2Z6yaehHQRbflW1ER3BBRDSJi24n50 mVOI2T4IWo7Djt2uIA9VU5k9ztowQj1zRQfwBdhebV/NtZdm6Zn+7dswIvROBMBHwU8Q1x a94w7Y8lLXiFjG1M7XGnkPu2gX4B0Xo+ptvOFjlSXJJgELDCXpkljz5zh4c7JadnT9ABJw u4uEKgDSmOCZ7AE+26tUOoSYOOgTVrtXmIQe2W/9141IZ1GnMKdjAxV3bPES+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gTjWc3Wlszqww for ; Mon, 01 Jun 2026 18:42:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 216e6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 01 Jun 2026 18:42:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f77d37cffdf3 - main - linuxulator: Return EINVAL for invalid inotify flags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f77d37cffdf3951b7f28b97005467241aa27c183 Auto-Submitted: auto-generated Date: Mon, 01 Jun 2026 18:42:52 +0000 Message-Id: <6a1dd2ac.216e6.650c1269@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f77d37cffdf3951b7f28b97005467241aa27c183 commit f77d37cffdf3951b7f28b97005467241aa27c183 Author: Ed Maste AuthorDate: 2026-06-01 18:22:09 +0000 Commit: Ed Maste CommitDate: 2026-06-01 18:42:38 +0000 linuxulator: Return EINVAL for invalid inotify flags We implement all of the currently-defined Linux inotify mask bits and flags, with the same values as Linux. Return EINVAL for unknown bits, as Linux does. This also moves the translation inline into linux_inotify_add_watch. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57387 --- sys/compat/linux/linux_file.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 30e79a53ad2a..9a1f21d5feb7 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -2034,23 +2034,17 @@ _Static_assert(LINUX_IN_ONESHOT == IN_ONESHOT, _Static_assert(LINUX_IN_EXCL_UNLINK == IN_EXCL_UNLINK, "IN_EXCL_UNLINK mismatch"); -static int -linux_inotify_watch_flags(int l_flags) -{ - if ((l_flags & ~(LINUX_IN_ALL_EVENTS | LINUX_IN_ALL_FLAGS)) != 0) { - linux_msg(NULL, "inotify_add_watch unsupported flags 0x%x", - l_flags); - } - - return (l_flags); -} - int linux_inotify_add_watch(struct thread *td, struct linux_inotify_add_watch_args *args) { + if ((args->mask & ~(LINUX_IN_ALL_EVENTS | LINUX_IN_ALL_FLAGS)) != 0) { + linux_msg(NULL, "inotify_add_watch unsupported flags 0x%x", + args->mask); + return (EINVAL); + } return (kern_inotify_add_watch(args->fd, AT_FDCWD, args->pathname, - linux_inotify_watch_flags(args->mask), td)); + args->mask, td)); } int