linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Tkac <vonsch@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Palfrader <weasel@debian.org>,
	linux-kernel@vger.kernel.org, debian-admin@lists.debian.org,
	team@security.debian.org, libpam-modules@packages.debian.org,
	stable@kernel.org
Subject: Re: 2.6.28, rlimits, performance and debian etch
Date: Mon, 2 Feb 2009 17:20:00 +0100	[thread overview]
Message-ID: <20090202162000.GA3050@evileye.atkac.englab.brq.redhat.com> (raw)
In-Reply-To: <20090129100509.6969970f.akpm@linux-foundation.org>

On Thu, Jan 29, 2009 at 10:05:09AM -0800, Andrew Morton wrote:
> On Thu, 29 Jan 2009 13:19:00 +0100 Adam Tkac <vonsch@gmail.com> wrote:
> 
> > 
> > Hi all,
> > 
> > I don't think the "rlim_infinity" patch should be reverted. Let me try
> > to explain why.
> > 
> > First, code which sets limits to RLIM_INFINITY is very bad idea and
> > that code is Debian specific. I downloaded original pam 0.79 (stripped):
> > 
> > for(i = 0; i < RLIM_NLIMITS; i++) {
> > 	...
> > 	int r = getrlimit(i, &pl->limits[i].limit);
> > 	...
> > 
> > as you can see original pam sets limits to inherited defaults. After
> > code written above Debian adds their patch:
> > 
> > if (limits_not_defined_in_limits_conf) {
> > 	...
> > 	case RLIMIT_NOFILE:
> > 	...
> > 		pl->limits[i].limit.rlim_cur = RLIM_INFINITY;
> > 		pl->limits[i].limit.rlim_max = RLIM_INFINITY;
> > 	...
> > }
> > 
> > so as you can see inherited default limits are overriden to infinity.
> > In my opinion Debian should revert their patch which is, at least,
> > pretty incorrect and unsecure.
> > 
> > Next argument is POSIX compatibility (from setrlimit() specification):
> > 
> > "The value RLIM_INFINITY, defined in <sys/resource.h>, shall be
> > considered to be larger than any other limit value. If a call to
> > getrlimit() returns RLIM_INFINITY for a resource, it means the
> > implementation shall not enforce limits on that resource. Specifying
> > RLIM_INFINITY as any resource limit value on a successful call to
> > setrlimit() shall inhibit enforcement of that resource limit."
> > 
> > So kernel does what is expected. If you want "unlimited" number of
> > descriptors, you have it.
> > 
> > Please consider again where exactly problem is, if in Debian patch or
> > in kernel patch. From my point of view Debian patch should be
> > reverted, not the kernel one.
> > 
> 
> Sure, debian might well be wrong.  But the bottom line is that the
> kernel changed, and people's machines broke.
> 
> If the kernel change was really really important then we might just
> grit our teeth and live with the breakage.  But this change _wasn't_ a
> terribly important one.  So I think we should back it out while we find
> another way of implementing it which does not break currently deployed
> installations.

Well, if we should fix Debian's problem I think better would be to set
limit of files to reasonable number instead of sysctl_nr_open (for
example 4096 or 8192).

Adam

  parent reply	other threads:[~2009-02-02 16:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21 11:52 2.6.28, rlimits, performance and debian etch Peter Palfrader
2009-01-23 21:07 ` Florian Weimer
2009-01-23 22:02   ` David Daney
2009-01-23 23:11     ` Peter Palfrader
2009-01-25 10:59     ` Florian Weimer
2009-01-27 23:17 ` Andrew Morton
2009-01-29 12:19   ` Adam Tkac
2009-01-29 18:05     ` Andrew Morton
2009-01-29 18:10       ` Peter Palfrader
2009-02-02 16:20       ` Adam Tkac [this message]
2009-02-08 22:31     ` Steve Langasek
2009-02-26 21:48 Frans Pop
2009-02-26 22:01 ` Steve Langasek
2009-02-27  7:30 ` Peter Palfrader

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=20090202162000.GA3050@evileye.atkac.englab.brq.redhat.com \
    --to=vonsch@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=debian-admin@lists.debian.org \
    --cc=libpam-modules@packages.debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.org \
    --cc=team@security.debian.org \
    --cc=weasel@debian.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;
as well as URLs for NNTP newsgroup(s).