From nobody Thu Feb 17 10:55:26 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 2ECFE19D4A77; Thu, 17 Feb 2022 10:55:27 +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 4JzsDZ6JzSz4jNp; Thu, 17 Feb 2022 10:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645095326; 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=6lc3/II1tJgbVWnV3U5dD2TC+QYYqK5x7RqybWaZGAE=; b=MFfefkVqXI2NtzD5SpZPvucHHZsRNT+C1dwAlWse9SPkZj3JVOXWi2+RY6CiVkzdikmOyq bHBJNufBZK9FYKJhHm2mFIDPLQ1MQExErM/lEo4jSh7OHv7PyT94ChVk5NURBZ9xUwXPd7 itHPuEBdVjt/kgJimTLuulDMkH0Q3tkmrm716WLGQBYS7nK+NZfj3nPbYCvfLtM7clBef+ HoJJz4IfTBlOQYNy3pTTVeM9iixEr0qhBoJnFqJ8xVMDvwWc2nS+7TVOI8W+utibvrfBfJ 9CKDC/cVKH5FA+WZRActniMEQTGbnkLmJhIg1on8NkRpaC9lVaKtsaNzwGsDtA== 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 B41A05CA; Thu, 17 Feb 2022 10:55:26 +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 21HAtQAx019938; Thu, 17 Feb 2022 10:55:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21HAtQbI019937; Thu, 17 Feb 2022 10:55:26 GMT (envelope-from git) Date: Thu, 17 Feb 2022 10:55:26 GMT Message-Id: <202202171055.21HAtQbI019937@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Edward Tomasz Napierala Subject: git: da51ef550cf5 - stable/13 - linux: implement O_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: trasz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: da51ef550cf54750fd4c962d52b84d33601e6e7e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645095326; 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=6lc3/II1tJgbVWnV3U5dD2TC+QYYqK5x7RqybWaZGAE=; b=nS/YcrJYrz+6yo47pFvg7kieewJB/aAX/QXIOYlzFiNhGcf1t8OB3i6/XbHs7wgq4PJ/9N J2z/ZdowxwNBMSRUNSzH93BxDTNkkRtXB94ZmncJ+sUaQPBr0YNQg/k+jzo4BzJ2wGHTKP tbKBoDOb51Uu9/ZJlau76fOzzCA5ItztXd6eC0bdMVeeRBHNn2TzIU/XZ0lw3GhDvQ49tD BxLIuhT52vxhwjPvvD9RaJOlZwbKQgVimUmN6+06VQxgG7ijik/s035vHlJfR3Axio2ZnO FNZU7jtvGAnQVnHWTYonH5LrI/d0+vFKvTC6Cl7kIT8086WRmB4O60WtLVoC1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645095326; a=rsa-sha256; cv=none; b=lTVxvg9EBrDmZHKdDUu3QaMaRNOO0iE5aOn2xPeGDaGTKreCLX1JdmdKM56nb4dTLfokCR H41M0+A3dH8ddtKlDEaCCQdsmiBRQ15Zk+GRX2wgCNns80mOWuOGkthsKNaNu30uIj/Wi7 LtIev/j2FH9mRtwwTOGxbImVSftkIX0+vOMY0N+fNE4w6ZoWYa2WhVZcR7kaeBMj5lhyON YrQquQCYO6EA1DiEgGTi6f4syMT5gZqb4wGXuuVeTjUuZEqi03/vdZGfKzLTXJixtqCDIz EAI7z7KoAc8pcFfLuAuRFyU3BxssirAhwj/SKnWoNZDpifGM/ZXsZcaRd5A99Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=da51ef550cf54750fd4c962d52b84d33601e6e7e commit da51ef550cf54750fd4c962d52b84d33601e6e7e Author: Edward Tomasz Napierala AuthorDate: 2021-04-15 14:24:51 +0000 Commit: Edward Tomasz Napierala CommitDate: 2022-02-13 21:06:37 +0000 linux: implement O_PATH Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D29773 (cherry picked from commit 1663120ae452fe3783c74ce40522caf0e2327608) --- sys/compat/linux/linux_file.c | 2 ++ sys/compat/linux/linux_file.h | 1 + 2 files changed, 3 insertions(+) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 0c40a14d58f7..438b100d4e21 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -162,6 +162,8 @@ linux_common_openflags(int l_flags) bsd_flags |= O_NOFOLLOW; if (l_flags & LINUX_O_DIRECTORY) bsd_flags |= O_DIRECTORY; + if (l_flags & LINUX_O_PATH) + bsd_flags |= O_PATH; /* XXX LINUX_O_NOATIME: unable to be easily implemented. */ return (bsd_flags); } diff --git a/sys/compat/linux/linux_file.h b/sys/compat/linux/linux_file.h index 03450b95f25c..ab137ba6b9c3 100644 --- a/sys/compat/linux/linux_file.h +++ b/sys/compat/linux/linux_file.h @@ -84,6 +84,7 @@ #define LINUX_O_NOFOLLOW 000400000 /* Do not follow links */ #define LINUX_O_NOATIME 001000000 #define LINUX_O_CLOEXEC 002000000 +#define LINUX_O_PATH 010000000 #define LINUX_F_DUPFD 0 #define LINUX_F_GETFD 1