From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: from tb-ob0.topicbox.com (tb-ob0.topicbox.com [64.147.108.117]) by inbox.vuxu.org (Postfix) with ESMTP id A2CD8211B5 for ; Sat, 6 Apr 2024 21:24:29 +0200 (CEST) Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob0.topicbox.com (Postfix) with ESMTP id 53109263D2 for ; Sat, 6 Apr 2024 15:24:29 -0400 (EDT) (envelope-from bounce.mM4f2926b33d54b9f6842c2078.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id 4E2B8147D97E; Sat, 6 Apr 2024 15:24:29 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=to:subject :message-id:references:in-reply-to:date:mime-version :content-type:content-transfer-encoding:list-help:list-id :list-post:list-subscribe:reply-to:from:list-unsubscribe; s= dkim-1; t=1712431469; x=1712517869; bh=Q2z4nAfAYUkkoQisBHw4fr+2y n/DmbgoaiUacIuVN0s=; b=g1QZMCOU+f6m3qCgxWIfw9KDbGLJfmz6C/GYNxyqR E71nMUnfsS5zAF2JN9La9EnHLPhz3wKrvbP7UyGqZUeUWXgBJuv8Z3LtKF0SYsk1 Bu0xW5KrBr6mjgpr4SXQ15MYyVyE+AbwEhwR3kEj8m6QaDbP+Wkfku+gQOF2zeS+ 1A= To: 9fans <9fans@9fans.net> Subject: Re: [9fans] openat() Message-Id: <17124314640.ceA1.70581@composer.9fans.topicbox.com> References: <17123537830.EbFe44.28920@composer.9fans.topicbox.com> <17123735270.469FFd7.853634@composer.9fans.topicbox.com> In-Reply-To: <17123735270.469FFd7.853634@composer.9fans.topicbox.com> Date: Sat, 6 Apr 2024 15:24:24 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=17124314641.2aa680fD.70581 Content-Transfer-Encoding: 7bit Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 47260026-f44b-11ee-aad8-876641decc0b Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UNjc1ZTczN2U3NzZlNWE5Yy1NNGYyOTI2YjMzZDU0YjlmNjg0MmMy?= =?UTF-8?B?MDc4Pg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> From: "Alyssa M via 9fans" <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M4f2926b33d54b9f6842c2078:1:zUDlAZ5MI0O4urMKSkumMCBo9qkXxrL3gt802iHa6jc --17124314641.2aa680fD.70581 Date: Sat, 6 Apr 2024 15:24:24 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Moody wrote: "What you _would_ want for this would be the ability to walk from the exist= ing fd, however the limits of 9p walk make this a bit impossible to impleme= nt in a great way in my opinion. "=20 Maybe the chan could keep two fids: the original walked fid, and an opened = clone of that fid? The open one could be used for read/write, etc, and the = original could be used for subsequent walks. Ron Minnich wrote: "The question I had was, can I get the benefit of *at without doing=20 what linux is doing, namely, for all system calls with a path, make an=20 '...at' version. I am guessing so, though=C2=A0I'm not sure it's as efficient." Could you do something like open ("/fd/5/as-dir/a/b/c", ...) or open ("#d/5/as-dir/a/b/c", ...) where 5 is the file descriptor of an open directory, and "as-dir" is effect= ively bound to the directory it has open?=20 The Linux docs make passing reference to "tricks involving /proc/../fd" whi= ch seems like a better idea than adding all those *at system calls... ... from the department of partly-baked ideas... ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T675e737e776e5a9c-M4f292= 6b33d54b9f6842c2078 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription --17124314641.2aa680fD.70581 Date: Sat, 6 Apr 2024 15:24:24 -0400 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Moody wrote:
"What you _w= ould_ want for this would be the ability to walk from the existing fd, howe= ver the limits of 9p walk make this a bit impossible to implement in a grea= t way in my opinion. "

Maybe the cha= n could keep two fids: the original walked fid, and an opened clone of that= fid? The open one could be used for read/write, etc, and the original coul= d be used for subsequent walks.

Ron Minnic= h wrote:
"The question I had was, can I get the benefi= t of *at without doing=20 what linux is doing, namely, for all system calls with a path, make an=20 '...at' version.
I am guessing so, though I= 9;m not sure it's as efficient."

= Could you do something like
open ("/fd/5/as-dir/a/b/c&= quot;, ...)
or
open ("#d/5/as-dir= /a/b/c", ...)
where 5 is the file descriptor of = an open directory, and "as-dir" is effectively bound to the direc= tory it has open?
The Linux docs make passing reference to= "tricks involving /proc/../fd" which seems like a better idea th= an adding all those *at system calls...

..= . from the department of partly-baked ideas...
= --17124314641.2aa680fD.70581--