From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by sourceware.org (Postfix) with ESMTP id 90F863851C07 for ; Tue, 12 May 2020 03:22:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 90F863851C07 Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-120-GiRjCvxuOz-BBd4huWd8Ng-1; Mon, 11 May 2020 23:22:34 -0400 X-MC-Unique: GiRjCvxuOz-BBd4huWd8Ng-1 Received: by mail-qt1-f199.google.com with SMTP id z8so12699242qtu.17 for ; Mon, 11 May 2020 20:22:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Bpcsz54UFvU6hYUY52h9I9oHo+lUJMa+LDZ1nXaaqo4=; b=srLkKi2thVG2rFyTX2rHvf22KmikLw4KCE0KiLXW5bOAuef2A+5W6GBkguxXI564rD H0K3hl3urS/RZLNh1iVS98mRHhkVvwwzVlqD9DNy++FgUbiuOPklKNqvnffz4YlVNlTN 9s85FsEzejpzlVTA4EiLbrrAMvG90GHkD2WkHQ1jx3jGPQ1bAFP+ntPGxUNKpPNjSTtK PIOQzZjsz54FRvU0FMv2pNcw7PwmulhakSq/K+FiKbOrJ0cbN1R+qLEr73lyYExo8FmT uA8o5vYnQvaxIrNg/fYja4uTKRzX0Rk0QOvUgzqIO0mm7t7h85aDEdp4z6mWJH0Tu8+V SZjA== X-Gm-Message-State: AGi0PuaunA+te0+GKm4q/4fwsDcwytv7KG2HZ4HwoH4nBJqcIEInoc+s m11V8QkMFgNwxC3fPHIW/ZEzj5vLjSXvw1epboWU5eA/Z5o+Otxu/Zjm1O8l4Ida1x9mfOZfU4X p0Nr4vWcwPV6YKDVgMoSk X-Received: by 2002:a0c:f1cb:: with SMTP id u11mr11282956qvl.10.1589253754191; Mon, 11 May 2020 20:22:34 -0700 (PDT) X-Google-Smtp-Source: APiQypJc98TT3zVADwgg9kIsqfHLh3WCHoKf09pXXE3kvMk8UUgARM84RQZ6H9sPhxlFfQmcTL4fZg== X-Received: by 2002:a0c:f1cb:: with SMTP id u11mr11282950qvl.10.1589253753984; Mon, 11 May 2020 20:22:33 -0700 (PDT) Received: from [192.168.1.4] (198-84-170-103.cpe.teksavvy.com. [198.84.170.103]) by smtp.gmail.com with ESMTPSA id n124sm9994416qkn.24.2020.05.11.20.22.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 May 2020 20:22:33 -0700 (PDT) Subject: Re: [PATCH] manual: Add Descriptor-Relative Access section To: Florian Weimer , "Michael Kerrisk (man-pages)" Cc: libc-alpha References: <87d07p9v73.fsf@mid.deneb.enyo.de> <87zhaoxnt4.fsf@mid.deneb.enyo.de> <65c7dd0a-bfc8-7a23-6503-1f813947e5fa@gmail.com> <87wo5suku5.fsf@mid.deneb.enyo.de> <87lfm8uf0u.fsf@mid.deneb.enyo.de> From: Carlos O'Donell Organization: Red Hat Message-ID: Date: Mon, 11 May 2020 23:22:32 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <87lfm8uf0u.fsf@mid.deneb.enyo.de> Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2020 03:22:37 -0000 On 5/4/20 7:16 AM, Florian Weimer wrote: > * Michael Kerrisk: > >>> +@item >>> +If a progrem wishes to access a directory tree which is being modified >>> +concurrently, perhaps even by a different user on the system, the >>> +program typically must avoid following symbolic links. With POSIX >>> +interfaces, this can be done using the @code{O_NOFOLLOW} flag >>> +(@pxref{Open-time Flags}) or the @code{AT_SYMLINK_FOLLOW} flag >>> +(described below), but these flags affect only the final component of a >>> +file name (the basename). Symbolic links in the parent directory part >>> +are still followed. Therefore, without directory-relative access, it is >>> +necessary to use the @code{fchdir} function to change the working >>> +directory (@pxref{Working Directory}) and use the basename for file >>> +system access. As explained before, this is not thread-safe. Keeping a >>> +file descriptor of the directory is also required to be able to return >> >> Maybe better: s/of/that refers to/ >> >>> +to it later, so descriptor-based access is a natural fit. >> >> s/descriptor-relativebased/descriptor-relative/ ? > > Thanks, we have now: > > […] > directory (@pxref{Working Directory}) and use the basename for file > system access. As explained before, this is not thread-safe. Keeping a > file descriptor that refers to the directory is also required to be able > to return to it later, so descriptor-relative access is a natural fit. > > 8<------------------------------------------------------------------8< After much review I think that patchwork is working as intended here. You must call your new patch v2 by changing the subject e.g. [PATCH v2] ... All other comments on the thread are just that, comments on the patch. -- Cheers, Carlos.