Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp622401ybp; Wed, 9 Oct 2019 01:21:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3vg30geb9LlL+DqzidLZF6L4Jvtq4kLfQNOdUWft5+7Vi8REP/QAHPp21KYUfd9U8VPPZ X-Received: by 2002:a17:906:d214:: with SMTP id w20mr1606049ejz.68.1570609300283; Wed, 09 Oct 2019 01:21:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570609300; cv=none; d=google.com; s=arc-20160816; b=o2k5r+n7vmYR3gtmjs3R1RZZzU2N25h8nj+BgrwjGn6uTwZuCAtuDOLcsuIjW5NvWZ tXfKzscOHVS/2gTDpW0OfUB2ICxfRJ1EB1plPEpchByiHvwE9wh+MzI38JV3ZAyBazdT PbEejzMQRb7pEfTYRwYhDfy9YmHcfU4Lre8LajU6DyKzc7r43kh9MUj4kMs/ww8vb08A Rusb/auk1Li/xCdnJTs6k3McnC1iCmyqT7hpnVkjL2KDar7p68WGZI5C25TNJ86gpNKR O/22ToSyHTMsdM+/St5ayXriyB1IAvn0jghBxvn6yigjtNvSZMX9qHieRIYNBk7j72ik XC/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QpAyimoASf/ySZNb9gSEKfdKcZEXPK7su5sGdAVCoO8=; b=Ntk6/X3dYcfz2jMNw4pGAjRNvjw0bbpfAsuS/iYaktbx5KH09QW8I2+CrAlYUSWoxF 1U7P+NhAdkt6VAtYhoRarycEt8ArmYSLdYfIbwEw4WoVNsl4i7fhPe0yrNAQRya7WqHR 7Vb2pOJwmEKDn5B4rQXCSsgiJ0gPn3gYWTwP1yvCgTZ6vOZ/6HPWr38+CV3oJQn3ukvu vg4pGPEBz/HoC+YRry8RcCe5i1EFo9Ate2HWpN3zLTPImEkGzcMFuKS+trEDU8Q4b7Ap 2jyazyGf/o/B8uM8gobv+WaJoe4pUa/590gS1CRUxI1BdBvAnzesU/O5M4/L7iJvexAT 9CeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XrNJ+DdA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si695183ejo.82.2019.10.09.01.21.16; Wed, 09 Oct 2019 01:21:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XrNJ+DdA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729742AbfJIISm (ORCPT + 99 others); Wed, 9 Oct 2019 04:18:42 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42711 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726765AbfJIISl (ORCPT ); Wed, 9 Oct 2019 04:18:41 -0400 Received: by mail-pg1-f195.google.com with SMTP id z12so912054pgp.9; Wed, 09 Oct 2019 01:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QpAyimoASf/ySZNb9gSEKfdKcZEXPK7su5sGdAVCoO8=; b=XrNJ+DdAH9P1JBeU1vRmJaFaoLTz9sLQDr6mIIrydIWD5G0xo9cAMywvwM/j4thHAO rM7Nj12+k8bmh4EOfebZ3IC3Xvgh/qS/gChkHYZLg62E9Q1ZMKz28oco6Nkop+b9N6sO yPpFtJx0Kuf9BNZ6otV2IBRZG79MtKBENvdzwWdIgas3P3UX7XyCIy/0Wej+IR4Yf2+E u0NbIAB9eZMUV+9eYLhpKIOp97nES5hgOGqZcLiiolSBI8rfbm3bavYEqc+2Zjym8C/s OVZRt3ny41FZOUX7LFHV6oxbaLlMgCbgsNRqlJXjGwe4eLU9ZN/g/Epni0DT9rajNj+B YIgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=QpAyimoASf/ySZNb9gSEKfdKcZEXPK7su5sGdAVCoO8=; b=g9jfq7meaptLlEZeU6V1v2FwVwcfAdYaIuczwjbcO5PjQBf1CjA2wZTv7KJGkVo923 vqSdgcFxSNJGc4YzoHmDEWLk6PvyfoIn+4ODps0A2A5jfa8JJluBEnZy6oUe9zQBzoVd JHVO4J6xdh3xO3hk+PGScyJNUBAEzsCxP8wywxsjAmzfV7TP5+FKeqvS1rb0+h5CRN39 N8kBR2MaZ+5SNMabY8/gONNeh9nF47eXxK8jvlY1k/2VLC22qIcgrQjPnUxDmYCEsRsG DFNaMXITrtsoRfsU+PZldCrO0W5PBNn8fS+if6QFRBHXnQS5dlXN8zb3B46oURJRDYIl 2rMw== X-Gm-Message-State: APjAAAVet7ikKl4uOfVBxkEiQuTahTEx4xRXVeazEYB1yvsrJQ8136uw v2E6wvpfz0pwNrVfimGbEZA= X-Received: by 2002:aa7:8dd4:: with SMTP id j20mr2480490pfr.36.1570609120311; Wed, 09 Oct 2019 01:18:40 -0700 (PDT) Received: from localhost.localdomain ([1.129.226.199]) by smtp.gmail.com with ESMTPSA id b18sm1661374pfi.157.2019.10.09.01.18.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2019 01:18:39 -0700 (PDT) Date: Wed, 9 Oct 2019 19:18:30 +1100 From: "G. Branden Robinson" To: "Michael Kerrisk (man-pages)" Cc: Philipp Wendler , "Eric W. Biederman" , "Serge E. Hallyn" , Christian Brauner , Aleksa Sarai , Reid Priedhorsky , Andy Lutomirski , Yang Bo , Jakub Wilk , Joseph Sible , Al Viro , werner@almesberger.net, linux-man , lkml , Containers , =?utf-8?B?U3TDqXBoYW5l?= Graber Subject: Re: For review: rewritten pivot_root(2) manual page Message-ID: <20191009081811.u4p3bd3bqvppgvcf@localhost.localdomain> References: <620c691a-065e-b894-4f06-7453012bc8d3@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wjvmnzdal332aq42" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --wjvmnzdal332aq42 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline At 2019-10-09T09:41:34+0200, Michael Kerrisk (man-pages) wrote: > I'm not sure. Some people have a bit of trouble to wrap their head > around the pivot_root(".", ".") idea. (I possibly am one of them.) > I'd be quite keen to hear other opinions on this. Unfortunately, > few people have commented on this manual page rewrite. pivot_root(".", ".") seems as ineffable to me as chdir("."). Meaning mostly, but not completely. I have an external drive with a USB cable that's a little dodgy. If it moves around a bit the external drive gets auto-unmounted, and then remounted in the same place, so I can experience the otherwise-baffling shell experience of: [disconnect/reconnect happens; the device is mounted again now] $ ls . Input/output error $ cd . $ ls . [perfectly fine listing] What's happened is that the meaning of "." has subtly changed in a way that I suppose would never have been seen back in Version 7 Unix days. Maybe I've been reading too much historical documentation (I'm currently enjoying McKusick et al.'s _Design and Implementation of the 4.4BSD Operations System_), but the way we describe and teach Unixlike systems in operating systems classes and, more to the point, in our man pages I think continues to be strongly informed by the invariants we learned in our youth, and which are slowly but steadily being invalidated. Concretely, I recommend having pivot_root(".", ".") in the man page as an example, but perhaps as an alternate. Because it is counterintuitive (to some minds), it's worth spending some time to explain it. But I would offer it because it's a valid use of the system call and because it makes sense to a domain expert (Eric Biedermann). I would try to offer an explanation myself but I lack the understanding. _If_ I'm following the discussion correctly, which I doubt, then what I imagine to happen is that a sequence point occurs between the function parameters, and "." changes its meaning as with my "cd ." example above. I am probably reasoning by analogy, and perhaps not by a good one. Also, it is okay if the language of this page continues to evolve over time. I appreciate your desire to get it "perfect" (or at least to some local optimum) now since you're most of the way through an overhaul of it, but it is not just the system that changes with time--the audience does too. Maybe in 5 or 10 years, the kids will be au fait with pivot_root(".", ".") and only some graybeards will continue to think of it as a bit strange. Regards, Branden --wjvmnzdal332aq42 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAl2dl9QACgkQ0Z6cfXEm bc6iQw//Wj9DRlvFekN/bWAFUHQFeVgm41LiCTNACrM37qSpuUf6oBcodnylh7XX VYfDss1uVUNWNPPaYfX+QCIaKVOdGFhnEcRcRtNFmEObnNJ8EsA5JbfLQ1/n+DCq 80UZjCZJNVQC9FK+Oy9VfByJA29hEhDP+sn7DyS7t6mdJmue9Edc9cBdT7TYq9We uCrUBhk/yF2hmjyIsMPJxwNG7gHVkKoasVwwXDEZhsT0Y5EOZ/ZmG1HMaEEXu3tw JCpK+vfuweMzoBRgq/wxmZpPTTvdPuwFf1CIBsyPpn5pY1d+1khQAbzmCwCIlRHc XYf31M/5ajh7y1Ksbg2YDffVck4l+Z4kYHVySkEWEtZYOtHLNXxnAI1k9c3mXSFF ebtezKXzFE35peNirzf9ev7hHDfDiL5szNKWvvLfCR4xTknR7nIQpq5J3BV+6l+D nFZ/4l8iLYcEMBUorfNZSaCWfm97XY2eBHwjQeWa/bDnLG/r2lpK6Eby5Ne6Az/s uOeBCgmgS7gK8r7Tc6DrsA0Ttk5FInLGXLcl9gm4niUKVle0+blMqGw3O3ZD6s+2 3uqw7cB4ojF9qUqG7l8CoCS2Lh5EE1eARGV7Qx/QUR72GmxcSJEqMYz6cxTIzpR7 JBRbZKpE526rNq0mbMJQJFqd9guJGRn8OXMBZMf6vJ2goEJLxro= =agT8 -----END PGP SIGNATURE----- --wjvmnzdal332aq42--