From nobody Fri Jun 17 19:24:03 2022 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 6A72484384B; Fri, 17 Jun 2022 19:24:05 +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 4LPpr45hr5z3BsW; Fri, 17 Jun 2022 19:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655493845; 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=e6gkDYzrSyjbKzyPqV6/oPtx9oRQ2dVToiRZpP2eJMc=; b=S9atdqLuREEEiJ4iBiPXKkTkWvnwJuwWc5adP3EtWGAFeHTVVm83prbNYTSmdypCeTzlRa LBn7RBXewRjE8gtEavFR42t58a5tPP9e/GJSTs3H8Azw8Cr6YGhGmdHb1qbsAkqsjlxnCZ fkQ9C872o8zUPJoavsCrBthfpGzNYvlZetLomDXXK57F/BJbq4hMfw0uMMM9NsoL1jjdsQ AfFK50cVJuxUI0DXz11Y7HHTx58Ii1QJ3nYnyftykEky3co1kJghKjmLZNBmobWxJGbVWP y3N5UeRSPzeAlT4PdjmzrIrG2/91eGvoIAcgo/5UMtdglJxhGo597zu3sCrMCw== 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 E792525870; Fri, 17 Jun 2022 19:24:03 +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 25HJO3Np095939; Fri, 17 Jun 2022 19:24:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJO3iL095938; Fri, 17 Jun 2022 19:24:03 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:24:03 GMT Message-Id: <202206171924.25HJO3iL095938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: dd5708d52404 - stable/13 - linux(4): make linkat(2) handle AT_EMPTY_PATH 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dd5708d52404c5577265d33ea3336b7b67ad6f74 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655493845; 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=e6gkDYzrSyjbKzyPqV6/oPtx9oRQ2dVToiRZpP2eJMc=; b=u2ZQe1C6JR7Z1g4igLS5RZ1w0OyLC3XbKfK6/zr0c/OS/Xzk0Wx0S1nlFcfNsxFYRugbmq XmmzEEHUdjvRsdyJqKSbA7WmLqQ7Q52AsqBqyUpye215Ha1FywqHR2oojjvEecpKdoFxlL CDO+JPAYAqtHy+oNALgezJNBNIVAscYv8kmmWrwi96lnQjlJiKpeJII2LGl+BdqtNfoUBS bPnqazDU4jR5ea1AYipTAzuBcPiESxLLcb8+6gKB4upvZ3OkfTBX77/J0sJHqyiO9CYDcm QiZdUzbGkKnilzP4VZFSuVPzfz3cN3vceIvJ69Swpzjk2y10JM3TocnK4hJfPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655493845; a=rsa-sha256; cv=none; b=YrBHxYyCDfj+UnfYr8Tdwjqlw0f4eYLR0ydyM2CMf7u6OS6wiyZE5Q6lXlnGF2WUpbQHgR CuCqDEQhkjGhI0uc5KbGZh6dROX16S1xJBZiuLNRBX/GDEo7AfQc5qC7L3A3BEuX2UAYxd hhye/sjWXrOya7nBQLfAL6sKEMJ9GphRw0h/w83vW2Dy9uIqEnBtu7waa1bKMKMnIsfUgh 7SeVo2pdA6CmnMZ46zAHDM17ye1e2iB7N7CJAVzJkflhzDMKrrFgwlEnUfuJPeOcwTb8I6 4fVgt8HQHPc5ehT/E7LXQk38iaOxSPeHyCXLvOBSMvNoCdlilDjxfAzFqhgqsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=dd5708d52404c5577265d33ea3336b7b67ad6f74 commit dd5708d52404c5577265d33ea3336b7b67ad6f74 Author: Edward Tomasz Napierala AuthorDate: 2021-05-04 12:09:31 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:22:14 +0000 linux(4): make linkat(2) handle AT_EMPTY_PATH Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D29974 (cherry picked from commit ee384b229dc62b2b0c9180db8c71fa99f30144cf) --- sys/compat/linux/linux_file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 17bf40fa5adb..ff5f5da7fc33 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1134,11 +1134,12 @@ linux_linkat(struct thread *td, struct linux_linkat_args *args) char *path, *to; int error, olddfd, newdfd, flag; - if (args->flag & ~LINUX_AT_SYMLINK_FOLLOW) + if (args->flag & ~(LINUX_AT_SYMLINK_FOLLOW | LINUX_AT_EMPTY_PATH)) return (EINVAL); flag = (args->flag & LINUX_AT_SYMLINK_FOLLOW) == 0 ? AT_SYMLINK_FOLLOW : 0; + flag |= (args->flag & LINUX_AT_EMPTY_PATH) == 0 ? AT_EMPTY_PATH : 0; olddfd = (args->olddfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->olddfd; newdfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd;