From nobody Fri Jun 17 19:38:28 2022 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 D3CD385B590; Fri, 17 Jun 2022 19:38:30 +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 4LPq8h6RXSz3QWt; Fri, 17 Jun 2022 19:38:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494709; 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=0vGuVVT/AM0972BsW9/GksQmLfJb/Zrtxl80sCuh2Dc=; b=WM+5frjvqLWakZx19Y7yoSZBSWQv3RmZOnYhwyQilRjJkEYuuOA5TJsgS1TKulkIJkMgf/ 0iWOtezpEQr10sSPrXXqa18wnH+wzykNe29eT63hD6eUVGKSu0AlD+y/eKfkPbQJdtvwX9 GwhY4r1ldCQa9fbx+Ef342h1cLY98y3laXug3UUKdF+1p5d3WSOwdYyhCQPsteGfC014jt Bz38Zu7ZyxN9DkqL6BaXcTozkv7msZTrX4eE721zglnpyIbb7l+hMC9sJ1ScFBoqmtevO1 S5vv8qbcKT/PYNBkorOMGDOKuzOOOxCRv1EPJUSb4T5Dz4MnAiwIvqOPFwRkaA== 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 6C3A725C47; Fri, 17 Jun 2022 19:38:28 +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 25HJcSl0014725; Fri, 17 Jun 2022 19:38:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJcSTd014724; Fri, 17 Jun 2022 19:38:28 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:38:28 GMT Message-Id: <202206171938.25HJcSTd014724@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: 86bcdd9d3463 - stable/13 - linux_name_to_handle_at: Support AT_EMPTY_PATH. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 86bcdd9d34638cabab1852d0ae1df6059c4f673d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494709; 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=0vGuVVT/AM0972BsW9/GksQmLfJb/Zrtxl80sCuh2Dc=; b=ZyW9WuVTngSbvXo8WE+jruVSkqM09BPOdk4YalWFm3f0Qda9CuaLXnWAzkIKNoInijwket CDd0ZUnRHyuiQ3w4C2dEFSWa6MBsykXQ7RJxqi7hIkvT6ep8Os+ycUQiG0zSNY6GDjpHad OIk2RkMJZiEPW0Toeu6RWqcED1fbYoPmpZtzV8FMbfmc0fq8PozjNMZDfyyrHeZR7HJdJk T+j0wYGA3yKQbWKIcm9I8oYXBiEnZ8lZb6184iMqBdKH5vGEVsyyAfwLLGc/yuZln0E66G mGmY0BmXE9xtNIw9St9ZbAPlr6PEvrRkC5ok6doLxYBTgNMYqrV7HGc4H37nog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494709; a=rsa-sha256; cv=none; b=BgV5/pt4PN8p3J3B0Nul0wqYnFhUfa9HeGVwMFHfZzbIUB/sKeyYhJRRT+D4yRN5lC9h55 S6q6LGE5OfoGZ1zhljbQD34ZlYnZk9W3w0P9U/uQRyzuo09qbzgA58UiAX1SEeqy43+MNu booB9/2NutMMlf9P2FzoXGIhzpWsRR8+xvX4GHfKRMWdMGhJkFfL4MV8IiMCJjAGTDBd65 pb+0/l3nfqtaRpnr83vK4PVXBBuExiIi50mjMjyIthA0WY9jW4md8ClSaA7b1HAvVYN0jH KtVD+uAE+P61sqqVEmSt5uCqO2T2oT87zACHqcFEfiYgrxkqgno3R2/ToxRc+Q== 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=86bcdd9d34638cabab1852d0ae1df6059c4f673d commit 86bcdd9d34638cabab1852d0ae1df6059c4f673d Author: John Baldwin AuthorDate: 2021-11-17 23:51:18 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:33:39 +0000 linux_name_to_handle_at: Support AT_EMPTY_PATH. Reviewed by: kib Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33050 (cherry picked from commit 8b2ce7a3bbd0a754d31ff3943d918b4c84c831a3) --- sys/compat/linux/linux_file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index a076c849aec8..bda843286b26 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -282,9 +282,6 @@ linux_name_to_handle_at(struct thread *td, if (args->flags & ~valid_flags) return (EINVAL); - if (args->flags & LINUX_AT_EMPTY_PATH) - /* XXX: not supported yet */ - return (EOPNOTSUPP); fd = args->dirfd; if (fd == LINUX_AT_FDCWD) @@ -293,6 +290,8 @@ linux_name_to_handle_at(struct thread *td, bsd_flags = 0; if (!(args->flags & LINUX_AT_SYMLINK_FOLLOW)) bsd_flags |= AT_SYMLINK_NOFOLLOW; + if ((args->flags & LINUX_AT_EMPTY_PATH) != 0) + bsd_flags |= AT_EMPTY_PATH; if (!LUSECONVPATH(td)) { error = kern_getfhat(td, bsd_flags, fd, args->name,