Skip to contentSkip to conversation

TTY, devpts: document pty count limiting

PATCH Superseded Konstantin Khlebnikov 5 participants 7 messages Oct 21, 2015 – Oct 22, 2015 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 TTY, devpts: document pty count limiting

Logic was changed in kernel 3.4 by commit e9aba5158a80 ("tty: rework pty count limiting") but still isn't documented. Better late than never.

---
 Documentation/filesystems/devpts.txt |    9 +++++++++
 Documentation/sysctl/kernel.txt      |    7 +++++++
 2 files changed, 16 insertions(+)
Documentation/filesystems/devpts.txt +9 -0
index 68dffd87f9b7..30d2fcb32f72 100644
@@ -51,6 +51,15 @@ where 'ns_exec -cm /bin/bash' calls clone() with CLONE_NEWNS flag and execs
 /bin/bash in the child process.  A pty created by the sshd is not visible in
 the original mount of /dev/pts.
 
+Total count of pty pairs in all instances is limited by sysctls:
+kernel.pty.max = 4096		- global limit
+kernel.pty.reserve = 1024	- reserve for initial instance
+kernel.pty.nr			- current count of ptys
+
+Per-instance limit could be set by adding mount option "max=<count>".
+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.
+
 User-space changes
 ------------------
 
Documentation/sysctl/kernel.txt +7 -0
index 6fccb69c03e7..01a42021c2e5 100644
@@ -63,6 +63,7 @@ show up in /proc/sys/kernel:
 - printk_delay
 - printk_ratelimit
 - printk_ratelimit_burst
+- pty/
 - randomize_va_space
 - real-root-dev               ==> Documentation/initrd.txt
 - reboot-cmd                  [ SPARC only ]
@@ -683,6 +684,12 @@ send before ratelimiting kicks in.
 
 ==============================================================
 
+pty/:
+
+See Documentation/filesystems/devpts.txt.
+
+==============================================================
+
 randomize_va_space:
 
 This option can be used to select the type of process address
#1 lore raw
Quoted 8 lines · Konstantin Khlebnikov

Logic was changed in kernel 3.4 by commit e9aba5158a80 ("tty: rework pty count limiting") but still isn't documented. Better late than never.

---
 Documentation/filesystems/devpts.txt |    9 +++++++++
 Documentation/sysctl/kernel.txt      |    7 +++++++
 2 files changed, 16 insertions(+)

Any reason you didn't cc: the tty maintainer on this?

#8 lore raw
In reply to Konstantin Khlebnikov
Quoted 8 lines · Konstantin Khlebnikov

Logic was changed in kernel 3.4 by commit e9aba5158a80 ("tty: rework pty count limiting") but still isn't documented. Better late than never.

---
 Documentation/filesystems/devpts.txt |    9 +++++++++
 Documentation/sysctl/kernel.txt      |    7 +++++++
 2 files changed, 16 insertions(+)

Any reason you didn't cc: the tty maintainer on this?

#2 lore raw
In reply to Greg KH
Quoted 11 lines · Greg KH
Quoted 8 lines · Konstantin Khlebnikov

Logic was changed in kernel 3.4 by commit e9aba5158a80 ("tty: rework pty count limiting") but still isn't documented. Better late than never.

---
 Documentation/filesystems/devpts.txt |    9 +++++++++
 Documentation/sysctl/kernel.txt      |    7 +++++++
 2 files changed, 16 insertions(+)

Any reason you didn't cc: the tty maintainer on this?

It looks like he attempted to and managed to get your old suse.de address.

Eric

#7 lore raw
In reply to a message not in the archive
Quoted 11 lines · Greg KH
Quoted 8 lines · Konstantin Khlebnikov

Logic was changed in kernel 3.4 by commit e9aba5158a80 ("tty: rework pty count limiting") but still isn't documented. Better late than never.

---
 Documentation/filesystems/devpts.txt |    9 +++++++++
 Documentation/sysctl/kernel.txt      |    7 +++++++
 2 files changed, 16 insertions(+)

Any reason you didn't cc: the tty maintainer on this?

It looks like he attempted to and managed to get your old suse.de address.

Eric

#3 lore raw
In reply to Eric W. Biederman
Quoted 12 lines · Eric W. Biederman
Quoted 10 lines · Greg KH
Quoted 8 lines · Konstantin Khlebnikov

Logic was changed in kernel 3.4 by commit e9aba5158a80 ("tty: rework pty count limiting") but still isn't documented. Better late than never.

---
 Documentation/filesystems/devpts.txt |    9 +++++++++
 Documentation/sysctl/kernel.txt      |    7 +++++++
 2 files changed, 16 insertions(+)
Quoted 4 lines
Quoted 1 line

Any reason you didn't cc: the tty maintainer on this?

It looks like he attempted to and managed to get your old suse.de address.

Ah, you are right, my apologies, that address is long dead :)

greg k-h

#5 lore raw
In reply to a message not in the archive
Quoted 12 lines · Eric W. Biederman
Quoted 10 lines · Greg KH
Quoted 8 lines · Konstantin Khlebnikov

Logic was changed in kernel 3.4 by commit e9aba5158a80 ("tty: rework pty count limiting") but still isn't documented. Better late than never.

---
 Documentation/filesystems/devpts.txt |    9 +++++++++
 Documentation/sysctl/kernel.txt      |    7 +++++++
 2 files changed, 16 insertions(+)
Quoted 4 lines
Quoted 1 line

Any reason you didn't cc: the tty maintainer on this?

It looks like he attempted to and managed to get your old suse.de address.

Ah, you are right, my apologies, that address is long dead :)

greg k-h