Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3860645pxu; Wed, 9 Dec 2020 02:25:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVDmaX0WMlzkRQUE6VBqJ5ybOyTeXgyOZNGhHg1BVAuRmzbMtMq562KzOau5s2Sx+FDBLU X-Received: by 2002:a17:906:3881:: with SMTP id q1mr1490409ejd.490.1607509559080; Wed, 09 Dec 2020 02:25:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607509559; cv=none; d=google.com; s=arc-20160816; b=GAjQahrc8oPCmxijBemk9OLa3R7TULvBI8XpfYRX+dY22l1DHSU3edI358aD+1bqKz JCFfqsVBU7iHTfzoBzpIZO2Fg5PmS5nqSPyAMBgzfYzZpoUIej2h4+PWM/cg3MY5p0Ao k6fngCWacsMc1aHhbTSOcKTxK/FbLm3qAel+p8XH/XmzugwwBH1cdeZCsA2PkeS6kOVn y+LQUZ4NW0rFFab4I3X3ZlZl74jZ5iRKm7DssuIMVl+bOWAAXogor2iUBO8jJSTOWIie A/aU/9LubbjmEu/wOGuLFf8l4ZSJYwG1s/nwNpYXD0BHBIpa9+gK6jR8ct/ySJhVCb4D 1Wug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version; bh=K2wXoI2y1d0O8odRwgY7rLmQpez7L0pbuEeMpC+q/yg=; b=YGeGVzJuiKt+oIQqKiezBiDSR7nY2OwpSuHBB9JNXwcmu+Tqlf6TizWH1L7wGgtAC9 Do5GX0Z9V5RAprqE3NnltY7huOlWSqj49AUpP/X9LLF/Dg4k/7lkP53Xtwmi9G3jEAw3 Iy7ChzPo4j4hW0KJK9rnH2/xhm2veMP5AUfkFy03QHcdU0NEeoIZr1liQogZc4wDySMC C324sGo6Qhxf0wBx/7xBps0hF+4sET6rG0rwSG8aJchZHi967uL0r+UIUQPElAgSb4Ee xOOY7MGwud6clqNygtEEfONlplLpiniZMFjosjw+/EzsUee78tNGbgad7MbfYJu08uIR zthQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c25si538828edx.588.2020.12.09.02.25.34; Wed, 09 Dec 2020 02:25:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729229AbgLIKW0 (ORCPT + 99 others); Wed, 9 Dec 2020 05:22:26 -0500 Received: from 19.mo4.mail-out.ovh.net ([87.98.179.66]:41452 "EHLO 19.mo4.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727800AbgLIKWZ (ORCPT ); Wed, 9 Dec 2020 05:22:25 -0500 X-Greylist: delayed 1210 seconds by postgrey-1.27 at vger.kernel.org; Wed, 09 Dec 2020 05:22:24 EST Received: from player698.ha.ovh.net (unknown [10.108.57.44]) by mo4.mail-out.ovh.net (Postfix) with ESMTP id 81E6A25B0FA for ; Wed, 9 Dec 2020 10:43:22 +0100 (CET) Received: from RCM-web5.webmail.mail.ovh.net (82-65-25-201.subs.proxad.net [82.65.25.201]) (Authenticated sender: steve@sk2.org) by player698.ha.ovh.net (Postfix) with ESMTPSA id 1D42F18F600CF; Wed, 9 Dec 2020 09:43:17 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 09 Dec 2020 10:43:16 +0100 From: Stephen Kitt To: "Michael Kerrisk (man-pages)" , Christian Brauner Cc: linux-man , Alejandro Colomar , lkml Subject: Re: [patch] close_range.2: new page documenting close_range(2) In-Reply-To: <20201209094039.ksqlt7g5mq7mp4mq@wittgenstein> References: <20201208215133.30575-1-steve@sk2.org> <20201209094039.ksqlt7g5mq7mp4mq@wittgenstein> User-Agent: Roundcube Webmail/1.4.3 Message-ID: <9020961b9cb4ebc61d6a07f603a226aa@sk2.org> X-Sender: steve@sk2.org X-Originating-IP: 82.65.25.201 X-Webmail-UserID: steve@sk2.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 11257310219080977789 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedujedrudejkedgtdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepggffhffvufgjfhgfkfigihgtgfesthekjhdttderjeenucfhrhhomhepufhtvghphhgvnhcumfhithhtuceoshhtvghvvgesshhkvddrohhrgheqnecuggftrfgrthhtvghrnhepheeftedvhfevuedthedthfektdelleegtdevfeetveefhfekgedttdefgfetgfeunecukfhppedtrddtrddtrddtpdekvddrieehrddvhedrvddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrheileekrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepshhtvghvvgesshhkvddrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 09/12/2020 10:40, Christian Brauner a écrit : > On Wed, Dec 09, 2020 at 09:50:38AM +0100, Michael Kerrisk (man-pages) > wrote: >> > +.PP >> > +.I flags >> > +can be set to >> > +.B CLOSE_RANGE_UNSHARE >> > +to unshare the range of file descriptors from any other processes, >> > +.I instead >> > +of closing them. >> >> Really "instead of closing them"? I had supposed that rather that this >> should be "before closing them". That's also how the kernel code reads >> to me, from a quick glance. > > It's also mentioned in the commit message. Basically setting > CLOSE_RANGE_UNSHARE is equivalent to: > > unshare(CLONE_FILES); > close_range(, ); Yes, I got that mixed up, thanks for the clarification! I'll send a v2 addressing the review comments later today. Regards, Stephen