Skip to contentSkip to conversation

Updated dynamic pty patch available

DISCUSSION H. Peter Anvin 4 participants 4 messages Feb 12, 2004 – Feb 14, 2004

lore
Share & tools
lore
#0 lore raw

ftp://ftp.kernel.org/pub/linux/kernel/people/hpa/dynpty-test-2.patch

... against the current top-of-bkcvs 2.6 kernel.

This version of the patch makes *both* legacy and Unix98 ptys configure options (Unix98 only if EMBEDDED), and the number of legacy ptys is a configuration option -- useful if you want to reduce the memory footprint, or if you really wants lots of these guys (256 is no longer a hard limit.)

Additionally, I have added a sysctl option -- /proc/sys/kernel/pty/max -- for limiting the number of Unix98 ptys. It was way too effective a DoS to eat up all kernel memory by opening /dev/ptmx repeatedly. The default is 4096, but it can be adjusted all the way up to 2^20 if desirable.

-hpa

#1 lore raw
Quoted 9 lines · H. Peter Anvin

This version of the patch makes *both* legacy and Unix98 ptys configure options (Unix98 only if EMBEDDED), and the number of legacy ptys is a configuration option -- useful if you want to reduce the memory footprint, or if you really wants lots of these guys (256 is no longer a hard limit.)
Additionally, I have added a sysctl option -- /proc/sys/kernel/pty/max -- for limiting the number of Unix98 ptys. It was way too effective a DoS to eat up all kernel memory by opening /dev/ptmx repeatedly. The default is 4096, but it can be adjusted all the way up to 2^20 if desirable.

Comes up and boots just fine here on my target boxen. I'm glad to have it. Bootlog from one of them attached.

I can send in console/etc. logs from both host and target of stress test runs, if provided stress tests.

-- wli

#2 lore raw
In reply to H. Peter Anvin
Quoted 9 lines · H. Peter Anvin

ftp://ftp.kernel.org/pub/linux/kernel/people/hpa/dynpty-test-2.patch

... against the current top-of-bkcvs 2.6 kernel.

This version of the patch makes *both* legacy and Unix98 ptys configure options (Unix98 only if EMBEDDED), and the number of legacy ptys is a configuration option -- useful if you want to reduce the memory footprint, or if you really wants lots of these guys (256 is no longer a hard limit.)

Patches, compiles, boots, and runs against 2.6.3-rc2-mm1, both with and without legacy ptys. Haven't gotten brave enough to try without Unix98 ptys, as I need those :)

#3 lore raw
In reply to H. Peter Anvin
Quoted 10 lines · H. Peter Anvin

ftp://ftp.kernel.org/pub/linux/kernel/people/hpa/dynpty-test-2.patch

... against the current top-of-bkcvs 2.6 kernel.

This version of the patch makes *both* legacy and Unix98 ptys configure options (Unix98 only if EMBEDDED), and the number of legacy ptys is a configuration option -- useful if you want to reduce the memory footprint, or if you really wants lots of these guys (256 is no longer a hard limit.)

Quoted 4 lines

Additionally, I have added a sysctl option -- /proc/sys/kernel/pty/max -- for limiting the number of Unix98 ptys. It was way too effective a DoS to eat up all kernel memory by opening /dev/ptmx repeatedly. The default is 4096, but it can be adjusted all the way up to 2^20 if desirable.

Looks good, I'll drop this into -tiny when I have proper net access again.

Signature · 1 line
Matt Mackall : http://www.selenic.com : Linux development and consulting