From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1091BC433E1 for ; Mon, 15 Jun 2020 06:48:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D841C20738 for ; Mon, 15 Jun 2020 06:48:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592203680; bh=Qapr2rbVocORKg4SiqEijr3TbDgc8abdVjfPsyD3fF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=K29menbs43JU+GgycZwzfAIxExI1qyNBUwEcAeHt7zNuXEP9IzKMUG8M3fPcJLay0 LgnQ0Aow94gKPtCMDa2cid9tRaNEg39AT/xdptsHYKJoEA+y6M5kiioKTxlo/S88OV 9DTjEyjdxxby6r3xNqdPNGGJwkuE3b9cddZZgbi0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728583AbgFOGrt (ORCPT ); Mon, 15 Jun 2020 02:47:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:59944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728483AbgFOGrP (ORCPT ); Mon, 15 Jun 2020 02:47:15 -0400 Received: from mail.kernel.org (ip5f5ad5c5.dynamic.kabel-deutschland.de [95.90.213.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 80D4421534; Mon, 15 Jun 2020 06:47:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592203632; bh=Qapr2rbVocORKg4SiqEijr3TbDgc8abdVjfPsyD3fF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V2/bS2iwr/BmvtRvHW6Vu987yYoLKE1eL/dLQXyzGbvtVgfYFRqBqMWSnSsY0lHsY UPp+C/kJBtrt/yFcIbsjlatw9RFHbQiKi90cspGalWhHjmktrQdXTZeSPHsYNHVesr zH+Bgq7KbPu4HPrbyh7MIlMFjZtd7H8g27895IJ4= Received: from mchehab by mail.kernel.org with local (Exim 4.93) (envelope-from ) id 1jkiti-009no8-BK; Mon, 15 Jun 2020 08:47:10 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet , Alexey Dobriyan , Kees Cook , Alexey Gladkov , "Eric W. Biederman" , linux-fsdevel@vger.kernel.org Subject: [PATCH 29/29] docs: fs: proc.rst: convert a new chapter to ReST Date: Mon, 15 Jun 2020 08:47:08 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A new chapter was added to proc.rst. Adjust the markups to avoid this warning: Documentation/filesystems/proc.rst:2194: WARNING: Inconsistent literal block quoting. And to properly mark the code-blocks there. Fixes: 37e7647a7212 ("docs: proc: add documentation for "hidepid=4" and "subset=pid" options and new mount behavior") Signed-off-by: Mauro Carvalho Chehab --- Documentation/filesystems/proc.rst | 44 ++++++++++++++---------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst index 53a0230a08e2..cc0fd2685562 100644 --- a/Documentation/filesystems/proc.rst +++ b/Documentation/filesystems/proc.rst @@ -2179,46 +2179,44 @@ subset=pid hides all top level files and directories in the procfs that are not related to tasks. 5 Filesystem behavior ----------------------------- +--------------------------- Originally, before the advent of pid namepsace, procfs was a global file system. It means that there was only one procfs instance in the system. When pid namespace was added, a separate procfs instance was mounted in each pid namespace. So, procfs mount options are global among all -mountpoints within the same namespace. +mountpoints within the same namespace:: -:: + # grep ^proc /proc/mounts + proc /proc proc rw,relatime,hidepid=2 0 0 -# grep ^proc /proc/mounts -proc /proc proc rw,relatime,hidepid=2 0 0 + # strace -e mount mount -o hidepid=1 -t proc proc /tmp/proc + mount("proc", "/tmp/proc", "proc", 0, "hidepid=1") = 0 + +++ exited with 0 +++ -# strace -e mount mount -o hidepid=1 -t proc proc /tmp/proc -mount("proc", "/tmp/proc", "proc", 0, "hidepid=1") = 0 -+++ exited with 0 +++ - -# grep ^proc /proc/mounts -proc /proc proc rw,relatime,hidepid=2 0 0 -proc /tmp/proc proc rw,relatime,hidepid=2 0 0 + # grep ^proc /proc/mounts + proc /proc proc rw,relatime,hidepid=2 0 0 + proc /tmp/proc proc rw,relatime,hidepid=2 0 0 and only after remounting procfs mount options will change at all -mountpoints. +mountpoints:: -# mount -o remount,hidepid=1 -t proc proc /tmp/proc + # mount -o remount,hidepid=1 -t proc proc /tmp/proc -# grep ^proc /proc/mounts -proc /proc proc rw,relatime,hidepid=1 0 0 -proc /tmp/proc proc rw,relatime,hidepid=1 0 0 + # grep ^proc /proc/mounts + proc /proc proc rw,relatime,hidepid=1 0 0 + proc /tmp/proc proc rw,relatime,hidepid=1 0 0 This behavior is different from the behavior of other filesystems. The new procfs behavior is more like other filesystems. Each procfs mount creates a new procfs instance. Mount options affect own procfs instance. It means that it became possible to have several procfs instances -displaying tasks with different filtering options in one pid namespace. +displaying tasks with different filtering options in one pid namespace:: -# mount -o hidepid=invisible -t proc proc /proc -# mount -o hidepid=noaccess -t proc proc /tmp/proc -# grep ^proc /proc/mounts -proc /proc proc rw,relatime,hidepid=invisible 0 0 -proc /tmp/proc proc rw,relatime,hidepid=noaccess 0 0 + # mount -o hidepid=invisible -t proc proc /proc + # mount -o hidepid=noaccess -t proc proc /tmp/proc + # grep ^proc /proc/mounts + proc /proc proc rw,relatime,hidepid=invisible 0 0 + proc /tmp/proc proc rw,relatime,hidepid=noaccess 0 0 -- 2.26.2