mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Upper limit for sysctl fs.file-max
Date: Wed, 1 May 2019 09:53:52 +0000	[thread overview]
Message-ID: <e980436491d144bfbd1410a02333ebfc@AcuMS.aculab.com> (raw)

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)


                 reply	other threads:[~2019-05-01  9:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e980436491d144bfbd1410a02333ebfc@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome