linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Upper limit for sysctl fs.file-max
@ 2019-05-01  9:53 David Laight
  0 siblings, 0 replies; only message in thread
From: David Laight @ 2019-05-01  9:53 UTC (permalink / raw)
  To: linux-kernel

The normal default for fs.file-max (the maximum number of file structures)
is 1/10240th of the available memory.

However it seems to be possible to set fs.file-max to any value
up to 2^64-1.
While all 'large' values are effectively the same this seems rather
excessive here.

Problems arrive when any shell scripts (or anything else that
only really has signed 64bit numbers) try to process values above
2^63-1 as these cause errors and/or other unexpected actions.

ISTM that the values of a lot of sysctl parameters should be limited
to avoid such problems.

We've hit this because something is awry in the 5.0 kernel in
ubuntu 19.04.
Booting the failing userspace with a 5.1-rcx kernel is ok.
Nothing looks wrong with the object code for the function that
sets the default, and the last thing it does is divide by 10
so it is difficult for it to generate -1.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-01  9:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-01  9:53 Upper limit for sysctl fs.file-max David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).