Received: by 10.223.164.202 with SMTP id h10csp3591637wrb; Mon, 20 Nov 2017 01:38:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMbLnqw3mjwmP/Pqvz/cRTrXV/g6p3HsPG+IVzwlzLM3+NybSYrorte2dDsUYwPhDK0v692I X-Received: by 10.99.144.68 with SMTP id a65mr13387451pge.429.1511170710365; Mon, 20 Nov 2017 01:38:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511170710; cv=none; d=google.com; s=arc-20160816; b=JadLuIXcn8XUN5IPctv+dlLpMaGkVaNtQL/t8LW8ynSWwV7kZGXO/mQ50pgikcZ6fI PV+tK/PKVY7T6VqO+IYGmNeb5uVBK+jdW0whsrzAf/rFMEbOJttDh5VWZl/Vcc4tzQo7 EORvcoZ2oQ+dMfTU4HHCwrVUGmPYblj6ffZvNPwMfqBZIVfXEthvLBmkjk8+TOqqT2NP G0NEe8kDk1jKWkCChWFeR/po2IgS2mG2BkWWWv1uEz04XAzMQubTG/N/8SHpxQG9f66g ynhufwn2Dze3q2OSO3CidUEu6fsrxcW9xIxtHma/r1GQ+67S0RVHkFEZjUWBFLWREw+P 6nsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:reply-to:mime-version :dkim-signature:arc-authentication-results; bh=HHFS3dE8usTlPdFETpPcp5F07QNEPGXBLId3R9VbyM0=; b=pSv5JOwGxt9iISpANqNKP1bwCA90l+nKMK1GD/hPSVzXKxCLZ718ELB3HvGVWvsvsU fxIYq6gJdJ0vA7Yh3JIz8Hlz3dQsbRqgHIC0vAGTIzUYSaXIzXDGPoC7gcLoLVZZfYq/ uXeDzcIKGvkU77Deyunqni46+o2MY3PMO9wsb7N5Z9sQd/vDwowk6WTstRd+s1f8996k 8vAB1QaI3Sj7P9djTnVM/zzv4swykvrVdr/1re+gc3lPaZoVbMiWdAqb4mPQZoyrmw4B VjjZeA8RE9FbfyBfJOVSQYcM4W7WMUt141FkkBwtZpuPSwGjLL7xC7DgAHSYuXM27YOM DdOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WTRAu+fy; 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=NONE 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 1si7848747plz.262.2017.11.20.01.38.19; Mon, 20 Nov 2017 01:38:30 -0800 (PST) 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=WTRAu+fy; 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=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751093AbdKTJhl (ORCPT + 68 others); Mon, 20 Nov 2017 04:37:41 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:43186 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750777AbdKTJhj (ORCPT ); Mon, 20 Nov 2017 04:37:39 -0500 Received: by mail-wm0-f66.google.com with SMTP id x63so17345902wmf.2; Mon, 20 Nov 2017 01:37:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=HHFS3dE8usTlPdFETpPcp5F07QNEPGXBLId3R9VbyM0=; b=WTRAu+fy+wsWFxVY+SSaqjtoIURB0c5qMtP3aoRM72XkUStj3DlOMsJHd92JYIF+qH t1Pqhf3F2b7FJ/I6xlF/IGvI84BGCmoFghjadwXith09/oZ1Jh8eHcA3JS1sS2HbBRMK iNXUZoWBrzMju7wkdyLCogi3znNCiju/PPqU6j3F728ADJucspA4thbJnd/v3yaudXIc pxQPcP7WRs6UIVgnCq2MYbEyD6v3ugEUtI4c7Sul3ZmQ9cmTziU2MBJ94lCYkyhEC2WS hgWId6/yPYB6z0z3TkW7+5DAuY3YcCXLl26aRVN6I/ewaduFQsP1All7fM3LnsU71KhA QS/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=HHFS3dE8usTlPdFETpPcp5F07QNEPGXBLId3R9VbyM0=; b=BIp5yieOFsHrw8F/Wju9NSFbJTqF92f7tYD9CJnUJV+5R6aIL8+gzHMRfs3zATkl2N CpL3pzuwKc4Za1SKVznKT76MQhjbgkmj4io8PFZLilgOmZqOW7i5+oJDb2jmyTvAoDUW VRQulCb+fdWVwJQKIkt9jmx1ew13F0AORMsLMQ7MDJu+exJy9LPD9C2t5KN/JiQh8YPq sgpsw3Le4O95BtTmhcwD0nAzuP7SApTRwSTHLifNiGwSwvENm9Wj/tHWP4LxTOj4YWVJ NvAaHOKnEMGOhX2oGjECpfPWcm1BsXnJfVk6qRo1pwqzA3dhG/ss/9Qv28spXCZeFxIh 17iw== X-Gm-Message-State: AJaThX7SVebfZ7t3yV8mhjU9aBs53JoYqiPNleQttioPGz3R4yiIWe5+ qExFDw4nnIYXVxAT+KMy2OS9FOSPKh8RXOedJvg= X-Received: by 10.80.225.77 with SMTP id i13mr19251169edl.128.1511170658254; Mon, 20 Nov 2017 01:37:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.245.52 with HTTP; Mon, 20 Nov 2017 01:37:17 -0800 (PST) Reply-To: mtk.manpages@gmail.com In-Reply-To: References: <20171113075537.GG5546@ram.oc3035372033.ibm.com> From: "Michael Kerrisk (man-pages)" Date: Mon, 20 Nov 2017 10:37:17 +0100 Message-ID: Subject: Re: Improving documentation of parent-ID field in /proc/PID/mountinfo To: Miklos Szeredi Cc: Ram Pai , lkml , linux-man , Alexander Eder , "linux-fsdevel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Miklos, On 20 November 2017 at 10:22, Miklos Szeredi wrote: > On Mon, Nov 20, 2017 at 10:07 AM, Michael Kerrisk (man-pages) > wrote: > >> But, the problem is that the existing description is at best misleading: >> >> (2) parent ID: the ID of the parent mount (or of self fo= r >> the top of the mount tree). >> >> That implies that we'll find one line in the list where field 1 and >> field 2 are the same. But we don't, because the mountns rootfs entry >> is not shown in mountinfo. On top of that, the reader is left >> confused, because when they look at mountinfo, they see one entry >> where the parent-ID doesn't exist in the list. So, something more than >> the current text is required. After digging around in the kernel >> source and noticing that chroot() will also cause this scenario, and >> taking into account your comments, I revised the text to: >> >> (2) parent ID: the ID of the parent mount (or of self fo= r >> the root of this mount namespace's mount tree). >> >> If the parent mount point lies outside the process'= s >> root directory (see chroot(2)), the ID shown her= e >> won't have a corresponding record in mountinfo whos= e >> mount ID (field 1) matches this parent mount I= D >> (because mount points that lie outside the process'= s >> root directory are not shown in mountinfo). As a spe= =E2=80=90 >> cial case of this point, the process's root moun= t >> point may have a parent mount (for the initramf= s >> filesystem) that lies outside the process's roo= t >> directory, and an entry for that mount point will no= t >> appear in mountinfo. >> >> How does that seem? > > Perfect. Thanks! And thanks for the fast review and response. Cheers, Michael --=20 Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ From 1584576372917864879@xxx Mon Nov 20 09:23:09 +0000 2017 X-GM-THRID: 1583929638158288060 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread