From nobody Fri Dec 19 02:48:22 2025 X-Original-To: dev-commits-src-all@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 4dXX5z1Qbmz6KhbK for ; Fri, 19 Dec 2025 02:48:23 +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 4dXX5y5ysyz3PHP for ; Fri, 19 Dec 2025 02:48:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766112502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w0WuIvkk2DaSxYXkMMbzux1q3uIqLTwkKQqVwdHsWMY=; b=vP9N4nzi6XJrh7G7aoZeJxGDZsAbZ4IjVEUd0H7Z6Cm/Nee3Fw3+uCLzyCUESeqEPinLGB 4JrXFgzt/yNpCVeCoRDTxPWLuyLDvRCELCtwIzl/ckgGUF+UtOXsAKIdqCtLETaLOgHbeZ TkpA+ynZRjEX9ap3MgIg5YcM20yQWTP76ZkHMtWKkDMc7AiGUZV/Eo0BV5r5nYhrwJHLiu w5/WG479ooplNBxcIAt5D+8/EnueyUfSOsbmYSj07IAbe1qleflwDmESV/NJl4IQFv/LhF FXDL5aeO3XBdyXJYITqfmuEtfy9jLtDvdoGwp5WzNriYc19NCmIAWvbitgoSjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766112502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w0WuIvkk2DaSxYXkMMbzux1q3uIqLTwkKQqVwdHsWMY=; b=m8iz+IVnvhJevW2WTBAX0EQsRt0bR2pT6GMu71OFIQVjOFN4/k7etaAsS+6qjNCPh1pn2b lijwqpYG/G5c7vr+axzlMETCAVWn5VFkdB9uC6wLguoqUxTSAuLaG3A0VLEv0FlkYxgB2G OOM/MK4l1D3sr2fLLCmwT4iqwwU5xYkoqa6wNsOwliMsLM+lR2d8ISvmzAcGfA2H0BqkfU VVNfzMVaCKCghyV2+ggu6B31fpDQ2xr/AhN57DA0Pm/+FLFbLEgGQij34T7YkgWa1q18df BNyMdkEqO8VQWoYfMI46fk6CGX5/e1U43YYUtq2WO01n3HWYBKn/z7/a13lbCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766112502; a=rsa-sha256; cv=none; b=irj9bDj6I0KbXsahAQzZ6o+mi3JP0bCfzzWwX3f5OXYOTZLUSelWXJE87V8Hp5x3GHjrwa fAJlmRrbwzSoee/H+YBO9IDz7w3OJCkgbZ1q8FIV+jXSK+QVylHKnYk0uhqIiEjz54mKlA fsTw2qdnjkDZ97DOFAse6s40AwPYlLteTpNbnxDufv6bSUgm664jqSle59GLg8UilTNq2Z msD1uriDr0IkgbftOveSlYMguoGKtPszJ8qG9O16FAOv07nPKfwUhEFB3Eb3Zz6JK2wEUN BhcA+VmbKttQNNKpjdhu0s4LaDSpsvQ/8kLtCKNH7il08OansZDTvoVyVA0o/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXX5y5W5jz15F3 for ; Fri, 19 Dec 2025 02:48:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 376fe by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 02:48:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ricardo Branco From: Ed Maste Subject: git: ec8d0b5f5dfb - stable/15 - linux: Implement F_DUPFD_QUERY fcntl with kcmp(2) KCMP_FILE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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/stable/15 X-Git-Reftype: branch X-Git-Commit: ec8d0b5f5dfb2711c2403b11d93ef26a81e764d2 Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 02:48:22 +0000 Message-Id: <6944bcf6.376fe.582c4f5f@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ec8d0b5f5dfb2711c2403b11d93ef26a81e764d2 commit ec8d0b5f5dfb2711c2403b11d93ef26a81e764d2 Author: Ricardo Branco AuthorDate: 2025-12-08 22:30:31 +0000 Commit: Ed Maste CommitDate: 2025-12-19 02:47:50 +0000 linux: Implement F_DUPFD_QUERY fcntl with kcmp(2) KCMP_FILE Signed-off-by: Ricardo Branco Reviewed by: kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1920 (cherry picked from commit fe21dbf70aa8c6dfd2010f30dd2d09f7b743e77d) --- sys/compat/linux/linux_file.c | 8 ++++++++ sys/compat/linux/linux_file.h | 1 + 2 files changed, 9 insertions(+) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index a4be5313aa96..daddafa325ad 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1457,6 +1457,14 @@ fcntl_common(struct thread *td, struct linux_fcntl_args *args) fdrop(fp, td); return (0); + case LINUX_F_DUPFD_QUERY: + error = kern_kcmp(td, td->td_proc->p_pid, td->td_proc->p_pid, + KCMP_FILE, args->fd, args->arg); + if (error != 0) + return (error); + td->td_retval[0] = (td->td_retval[0] == 0) ? 1 : 0; + return (0); + default: linux_msg(td, "unsupported fcntl cmd %d", args->cmd); return (EINVAL); diff --git a/sys/compat/linux/linux_file.h b/sys/compat/linux/linux_file.h index 7448dc597230..0b6ca536be7d 100644 --- a/sys/compat/linux/linux_file.h +++ b/sys/compat/linux/linux_file.h @@ -127,6 +127,7 @@ #define LINUX_F_SETLEASE (LINUX_F_SPECIFIC_BASE + 0) #define LINUX_F_GETLEASE (LINUX_F_SPECIFIC_BASE + 1) +#define LINUX_F_DUPFD_QUERY (LINUX_F_SPECIFIC_BASE + 3) #define LINUX_F_CANCELLK (LINUX_F_SPECIFIC_BASE + 5) #define LINUX_F_DUPFD_CLOEXEC (LINUX_F_SPECIFIC_BASE + 6) #define LINUX_F_NOTIFY (LINUX_F_SPECIFIC_BASE + 2)