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.7 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 F1E6322144 for ; Sat, 6 Apr 2024 00:30:16 +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 43B561FB88 for ; Fri, 5 Apr 2024 18:30:16 -0400 (EDT) (envelope-from bounce.mM1c147cadc76c65a4fbb9aa76.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id 3E4681470B56; Fri, 5 Apr 2024 18:30:16 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=TdX36f9j header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=paurea@gmail.com smtp.helo=mail-ej1-f47.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type:list-help:list-id:list-post :list-subscribe:reply-to:content-transfer-encoding :list-unsubscribe; s=sysmsg-1; t=1712356216; bh=aWSy0rGruXJRN70X p4nhX1VfZpdMqwnPtI8zP3jA3Io=; b=hOSgLVD+qOucJqvrOIHVWza+mx5vwUIN AbKcKR32Ghl671CO2lRK3OW0svM1q1POov+kTPEe4UgU81ZQ4hJJKmvWz4Xo51Q1 Axv919G7kS3W39+8IJKPbBqt5RnigXQ6j5C4X1Hs6Iyu85+/r6KSvqEpEICmwupe Ra6qqzkiXrY= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1712356216; b=PITzANiqsNSiN09iwU45++5X1WB0cXDlT+ApWBz1AXqnPTWeEz Y/nbr9/RNIHdd/vwId54dbxh7QGdENiDgdJHVvemFS0vyRGo0Vm5ubGOHzOMOAgH wQcQTrpVbJSj70kXSIX/t1HT68w7L4YhQG0hSpfiXD8/rVG87IP5UBY+U= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=TdX36f9j header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=paurea@gmail.com smtp.helo=mail-ej1-f47.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=TdX36f9j header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.218.47 (mail-ej1-f47.google.com); spf=pass smtp.mailfrom=paurea@gmail.com smtp.helo=mail-ej1-f47.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=GrnY1Oxi; x-me-sender=none; x-ptr=pass smtp.helo=mail-ej1-f47.google.com policy.ptr=mail-ej1-f47.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h= mime-version:references:in-reply-to:from:date:message-id:subject :to:content-type:list-help:list-id:list-post:list-subscribe :reply-to:content-transfer-encoding:list-unsubscribe; s=dkim-1; t=1712356216; x=1712442616; bh=IsIVndUgEfqZAFUCayXT3qVvSNt+TTJG aODVWW6GlfU=; b=hU12xt5nBLM7Wcaa/b3J6m23Mv87Oyzp4eOkBxSHdYd5dVXO yU8ZrP/tkxxJPfWyg0VN8lDhfvGHAUvkWe59v8rU7e/chGqHLM4EqF+ntuOh1KTc etUgfrpOFdbfpAIoTHd3D8WIki68tj4FOCG8rm1ZaQs4M3sFIWd+Whi/EQE= Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id 9D120125C71F for <9fans@9fans.net>; Fri, 5 Apr 2024 18:29:58 -0400 (EDT) (envelope-from paurea@gmail.com) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id 370506121E4; Fri, 5 Apr 2024 18:29:58 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1712356198; b=F6mnMxdfMX9aWElP7C9KO7TRcj7seTJbm2LefHAXzy3Sif6lkg NH0lVoqVG/sPDcsPb6wRMz/Z52edSZK7grRnCqwN6X9ikDAb7fRc3xSHtxHOertu 6NKNFm7KdsM5iklQDHdRiQtHB3KVbj9reoaPim7N1Qg6TpOGcVBBbCJ+Hgmjy7W5 fDaYl1Z8Pi2Z6JO5Ho5WEwEQo1UkyOk0/1ud6Go3EoR2y7DdysQxGi3nJGAh/o1q GIctjHYkZSjUclBY2eQECD6ccRX2hQdwL8enP/LMibRvioY8t2+InGMaROLtXo8/ REg2iigrMBOAG/QrvPbXMGv/1YILdxLdR8SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; s=arcseal; t=1712356198; bh=+4vo5BlKFh3MGwPLiPewERN7BWHOTaWPHlauq0xdBg0=; b=VWMYauO0wlkN x+YrjSoEGLTdcheS3ir4E8mGDNGQJlnqVOw0x7X6Eq3kjWm3xL3nbqwb+8pj4Wzn THAmNZsxgqGDHQC2FphxAjjidbfm+wsybgNY4IBQGo+GpeRCbLF/pMt6G3wS48eV FwfAN/b1PGC/0cJaxoQI7FUp1NwzOcSeyzUK/9vr+Bs1OtBEC4Ifxf5xrV7+sAlo vDUCmq/LZnds3DohEonZ0vi9WrGeWDu3X8tqbvqPkCYwnW7GfFdNEaPkpgoK2LDn Gb598pytHfdfe2r3ver/JNkWyF5TNpCjJSiK0hXXsLtA++TUgYggI12OIH4uLur+ o2YXz0riwg== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=TdX36f9j header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.218.47 (mail-ej1-f47.google.com); spf=pass smtp.mailfrom=paurea@gmail.com smtp.helo=mail-ej1-f47.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=GrnY1Oxi; x-me-sender=none; x-ptr=pass smtp.helo=mail-ej1-f47.google.com policy.ptr=mail-ej1-f47.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvledrudeguddgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeggfhgjhf ffkffuvfgtsegrtderredttdejnecuhfhrohhmpefiohhrkhgrucfiuhgrrhguihholhgr uceophgruhhrvggrsehgmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpeeuffeivd dttdetfedvjedtuedvieelfedtgfeiveejudegvdeutddugeetjeduleenucffohhmrghi nhepthhophhitggsohigrdgtohhmnecukfhppedvtdelrdekhedrvddukedrgeejnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddtledrkeehrddvudek rdegjedphhgvlhhopehmrghilhdqvghjuddqfhegjedrghhoohhglhgvrdgtohhmpdhmrg hilhhfrhhomhepoehprghurhgvrgesghhmrghilhdrtghomheqpdhnsggprhgtphhtthho pedupdhrtghpthhtohepoeelfhgrnhhsseelfhgrnhhsrdhnvghtqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'paurea@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="paurea@gmail.com"; helo=mail-ej1-f47.google.com; client-ip=209.85.218.47 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Fri, 5 Apr 2024 18:29:57 -0400 (EDT) (envelope-from paurea@gmail.com) Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a4e60a64abcso650467566b.1 for <9fans@9fans.net>; Fri, 05 Apr 2024 15:29:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712356196; x=1712960996; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+4vo5BlKFh3MGwPLiPewERN7BWHOTaWPHlauq0xdBg0=; b=GrnY1OxiGUV3ByPUD52+RCjuuRD7aedOlR3812DnF4/Zn1oi74n4KIIOsWOfHotBdx 5XzfXI/jlqfKzzvo82xHJaV5fUCitJ3xVPxzt5gzFrAotSszwxoyvX9Fs1EoE8v9O8E6 XD2A5XPdbjko7FAFFHMJvq4ap+ivNMaD5nZhq4Bg1qSEAdch4eDbMGBoJRT1zd1qjll3 TghXGHERTcNhawXARlrt+OI0DCdaaI1Lt1xlTM0yBVJbQrOmYG8V2786cbJPK8DEd7d2 CHQ+Fh17Jr2Lv+6p46cKRoW6ptaWPLPwQamu0zh6hWzVyuRVN/Ah2TxQ1YWxtH3OR8ic 1C/g== X-Gm-Message-State: AOJu0YzKVACEa1fETtoExbyChIioTW1NmEYS+K0L4P+rM3jB8Sb4ZVUy ZRbgvX9kPT0kB5ALA/sHl5AV9s2wBQFzfbq2+sHmfAKaImGSTxgYDLDwZXV+t2PL2fsCF2L/HGw 9MNoHPAJREK9s9/H8p9ELFbQfSkzqogQh X-Google-Smtp-Source: AGHT+IEmtBviy9ACddl93Ba8FcZFNi2SaEKiZup2tFtLq8Bl0WmI3WIGeeNd962lmMAzzMP3+/4jBOJTqL8MPI3EvMs= X-Received: by 2002:a17:906:da03:b0:a4a:3b6e:1fa9 with SMTP id fi3-20020a170906da0300b00a4a3b6e1fa9mr2670351ejb.15.1712356196277; Fri, 05 Apr 2024 15:29:56 -0700 (PDT) MIME-Version: 1.0 References: <17123537830.EbFe44.28920@composer.9fans.topicbox.com> In-Reply-To: <17123537830.EbFe44.28920@composer.9fans.topicbox.com> From: Gorka Guardiola Date: Sat, 6 Apr 2024 00:29:45 +0200 Message-ID: Subject: Re: [9fans] openat() To: 9fans <9fans@9fans.net> Content-Type: multipart/alternative; boundary=000000000000cee577061560fe2d Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 0dfe3aca-f39c-11ee-8ae0-8ecc8c8c1320 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UNjc1ZTczN2U3NzZlNWE5Yy1NMWMxNDdjYWRjNzZjNjVhNGZiYjlh?= =?UTF-8?B?YTc2Pg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Content-Transfer-Encoding: 7bit List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M1c147cadc76c65a4fbb9aa76:1:IQxJ0-GqnvsxU0ACbZSfA3AaDUxPrIvow66Nqm4qhYM --000000000000cee577061560fe2d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Apr 5, 2024, 23:49 Alyssa M via 9fans <9fans@9fans.net> wrote: > Are you thinking narrowly about "What changes to the Plan 9 kernel would > you make to emulate the Linux openat() system call" or more generally abo= ut > "How would you design a facility for plan 9 that provides an equivalent > service? > Yes, this is what I understood between my first answer and the second. You don't want to rewalk the path and you already have the fid with the directory part walked in the chan of dirfd. I think that if you walk the remaining path from that chan (cloning it) you preserve the same guarantees provided by openat. > As I understand it from the rationale section on the linux man page, the > call exists to avoid a race condition between checking that a directory > exists and doing something to a path containing it. An additional motivat= or > is providing the effect of additional current working directories notably > for Linux threads (which presumably don't have their own. I think > 'threads' (processes that share memory) on Plan 9 do???). > > This is all based on the assumption that holding a file/directory open > keeps it alive and in existence... which on Plan 9, I think it doesn't, > does it? As I understand it, remove can remove a file or directory that is > open, which is not like UNIX/Linux... > > Sorry, I'm just trying to understand the question. > > > *9fans * / 9fans / see discussions > + participants > + delivery options > Permalink > > ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T675e737e776e5a9c-M1c147= cadc76c65a4fbb9aa76 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription --000000000000cee577061560fe2d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


<= div class=3D"gmail_attr" dir=3D"ltr">On Fri, Apr 5, 2024, 23:49 Alyssa M vi= a 9fans <9fans@9fans.net> wrot= e:
Are you think= ing narrowly about "What changes to the Plan 9 kernel would you make t= o emulate the Linux openat() system call" or more generally about &quo= t;How would you design a facility for plan 9 that provides an equivalent se= rvice?

Yes, this is what I understood between my first answe= r and the second. You don't want to rewalk the path and you already hav= e the fid with the directory part walked in the chan of dirfd. I think that= if you walk the remaining path from that chan (cloning it) you preserve th= e same guarantees provided by openat.



As I und= erstand it from the rationale section on the linux man page, the call exist= s to avoid a race condition between checking that a directory exists and do= ing something to a path containing it. An additional motivator is providing= the effect of additional current working directories notably for Linux thr= eads (which presumably don't have their own. I think 'threads'&= nbsp; (processes that share memory) on Plan 9 do???).

This is all based on the assumption that holding a file/directo= ry open keeps it alive and in existence... which on Plan 9, I think it does= n't, does it? As I understand it, remove can remove a file or directory= that is open, which is not like UNIX/Linux...

=
Sorry, I'm just trying to understand the question.


<= div id=3D"topicbox-footer" style=3D"margin:10px 0 0;border-top:1px solid #d= dd;border-color:rgba(0,0,0,.15);padding:7px 0;"> 9fans / 9fans / see discussions + participants + delivery&n= bsp;options Permalink = --000000000000cee577061560fe2d--