Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp707888ybz; Wed, 15 Apr 2020 17:11:02 -0700 (PDT) X-Google-Smtp-Source: APiQypJO1wKaqhUN/oTraepdTr62b6dwPWow0y3cHQwQpltwb+xV4BC8jNflwsDTcy/R8HepjELy X-Received: by 2002:a05:6402:b99:: with SMTP id cf25mr19820819edb.372.1586995862396; Wed, 15 Apr 2020 17:11:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586995862; cv=none; d=google.com; s=arc-20160816; b=hfuHL6iE41qR+hVbEW/nEal50/d6RNTOf8jTzN43ff6j6f/KLYEn0pqfwPhSybBXON 14JIEl99tl2Giqyp4fzxhlosshXgVCvkiD3GGAszLnpjD27tu2HIc4k3lBdnoZ/UAR3a Ceq3Y/LHpy7dQoVD5dGRzTE3x8eWoxjyX4of86LU1lDg6nSM/bB2+aqKzd4HFFhnJLPX 1Qpb6wUPUcloyG5atZSIbPx7VN4vUvg5QlJDkzv8jS9boJUZ3bj27aV+o7IBC728wl+J 6WNUycXJCfWD5/cLyxFc2E+Zzk+mOVfE7vz2EC2r+WzMSRJF8/YSPwU0AayvNtDEsn43 KuTw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=t6jQLX/+CxNA3JjkoS+SHa3MbwLil3In2W08lEROa3Y=; b=ij3kzYESYt6pcoQLIJqPW9EQrxNkFbV/TWnV7HerQup7FsrNz5rZO2qFwrl+7G7bGz 1n8uJpmfLxImZEZwJOi5oUiBhJFNaJCy+21t6kY6zF/HfwCQUoqzJ+iFM3+sBR7DXvtq xMgobWEyqhmMxuGnoAGEvvrNft9172TGklM4Qppw/16eLecyqXYByNKqiM64K+qulCqD Uxr/EWpuxxohCBdEHvZw52mOIVJSPjo4kV1ROdHmu1tzp5sNyclXe1K3A4J4M9EvQg93 Uz3oFk+idDbVeyGGN0fqsu94voexNkAZBjX4FB0oBTbPq3M6IHMSUfaOk09tGZwDEV+d xGSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SbfuPht6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 24si11131059ejv.109.2020.04.15.17.10.39; Wed, 15 Apr 2020 17:11:02 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=SbfuPht6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392192AbgDOOoW (ORCPT + 99 others); Wed, 15 Apr 2020 10:44:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:45454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394040AbgDOOc6 (ORCPT ); Wed, 15 Apr 2020 10:32:58 -0400 Received: from mail.kernel.org (ip5f5ad4d8.dynamic.kabel-deutschland.de [95.90.212.216]) (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 2C01D21707; Wed, 15 Apr 2020 14:32:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586961171; bh=whIc/g6snA4mC0yASCocLrh5mqkEG1560/rJBnBIugM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SbfuPht6vNKQOBXa5+YSjoEn4FTB+aRexUz68eM2lVg33m2m9nSmaV3b9y0vVlA0Q cDTnZg5a/ndZXiymvjT4BL3oPiTv5PpVmO+FrQseVT77uvPk3WqqAsFtMxqNQEa0gS izHYznx9ThRsNmujiX3RfdHVrzW+kczH7W40mj7w= Received: from mchehab by mail.kernel.org with local (Exim 4.92.3) (envelope-from ) id 1jOj5t-006kOj-E8; Wed, 15 Apr 2020 16:32:49 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet Subject: [PATCH 13/34] docs: filesystems: convert devpts.txt to ReST Date: Wed, 15 Apr 2020 16:32:26 +0200 Message-Id: <0144d68b5afc2930b34e62e66120d2c76f897c09.1586960617.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.25.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 - Add a SPDX header; - Add a document title; - Some whitespace fixes and new line breaks; - Mark literal blocks as such; - Add it to filesystems/index.rst. Signed-off-by: Mauro Carvalho Chehab --- Documentation/admin-guide/sysctl/kernel.rst | 2 +- Documentation/filesystems/devpts.rst | 36 +++++++++++++++++++++ Documentation/filesystems/devpts.txt | 26 --------------- Documentation/filesystems/index.rst | 1 + 4 files changed, 38 insertions(+), 27 deletions(-) create mode 100644 Documentation/filesystems/devpts.rst delete mode 100644 Documentation/filesystems/devpts.txt diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst index 39c95c0e13d3..6427cfa6cc91 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -880,7 +880,7 @@ this sysctl interface anymore. pty === -See Documentation/filesystems/devpts.txt. +See Documentation/filesystems/devpts.rst. randomize_va_space diff --git a/Documentation/filesystems/devpts.rst b/Documentation/filesystems/devpts.rst new file mode 100644 index 000000000000..a03248ddfb4c --- /dev/null +++ b/Documentation/filesystems/devpts.rst @@ -0,0 +1,36 @@ +.. SPDX-License-Identifier: GPL-2.0 + +===================== +The Devpts Filesystem +===================== + +Each mount of the devpts filesystem is now distinct such that ptys +and their indicies allocated in one mount are independent from ptys +and their indicies in all other mounts. + +All mounts of the devpts filesystem now create a ``/dev/pts/ptmx`` node +with permissions ``0000``. + +To retain backwards compatibility the a ptmx device node (aka any node +created with ``mknod name c 5 2``) when opened will look for an instance +of devpts under the name ``pts`` in the same directory as the ptmx device +node. + +As an option instead of placing a ``/dev/ptmx`` device node at ``/dev/ptmx`` +it is possible to place a symlink to ``/dev/pts/ptmx`` at ``/dev/ptmx`` or +to bind mount ``/dev/ptx/ptmx`` to ``/dev/ptmx``. If you opt for using +the devpts filesystem in this manner devpts should be mounted with +the ``ptmxmode=0666``, or ``chmod 0666 /dev/pts/ptmx`` should be called. + +Total count of pty pairs in all instances is limited by sysctls:: + + kernel.pty.max = 4096 - global limit + kernel.pty.reserve = 1024 - reserved for filesystems mounted from the initial mount namespace + kernel.pty.nr - current count of ptys + +Per-instance limit could be set by adding mount option ``max=``. + +This feature was added in kernel 3.4 together with +``sysctl kernel.pty.reserve``. + +In kernels older than 3.4 sysctl ``kernel.pty.max`` works as per-instance limit. diff --git a/Documentation/filesystems/devpts.txt b/Documentation/filesystems/devpts.txt deleted file mode 100644 index 9f94fe276dea..000000000000 --- a/Documentation/filesystems/devpts.txt +++ /dev/null @@ -1,26 +0,0 @@ -Each mount of the devpts filesystem is now distinct such that ptys -and their indicies allocated in one mount are independent from ptys -and their indicies in all other mounts. - -All mounts of the devpts filesystem now create a /dev/pts/ptmx node -with permissions 0000. - -To retain backwards compatibility the a ptmx device node (aka any node -created with "mknod name c 5 2") when opened will look for an instance -of devpts under the name "pts" in the same directory as the ptmx device -node. - -As an option instead of placing a /dev/ptmx device node at /dev/ptmx -it is possible to place a symlink to /dev/pts/ptmx at /dev/ptmx or -to bind mount /dev/ptx/ptmx to /dev/ptmx. If you opt for using -the devpts filesystem in this manner devpts should be mounted with -the ptmxmode=0666, or chmod 0666 /dev/pts/ptmx should be called. - -Total count of pty pairs in all instances is limited by sysctls: -kernel.pty.max = 4096 - global limit -kernel.pty.reserve = 1024 - reserved for filesystems mounted from the initial mount namespace -kernel.pty.nr - current count of ptys - -Per-instance limit could be set by adding mount option "max=". -This feature was added in kernel 3.4 together with sysctl kernel.pty.reserve. -In kernels older than 3.4 sysctl kernel.pty.max works as per-instance limit. diff --git a/Documentation/filesystems/index.rst b/Documentation/filesystems/index.rst index 8e3ccb4ed483..470b2da2b7b1 100644 --- a/Documentation/filesystems/index.rst +++ b/Documentation/filesystems/index.rst @@ -25,6 +25,7 @@ algorithms work. locking directory-locking dax + devpts automount-support -- 2.25.2