public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tim Hockin <thockin@sun.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: PATCH: report NGROUPS_MAX via a sysctl (read-only)
Date: Thu, 19 Feb 2004 22:35:19 -0800	[thread overview]
Message-ID: <20040220063519.GP9155@sun.com> (raw)
In-Reply-To: <20040219213028.42835364.akpm@osdl.org>

On Thu, Feb 19, 2004 at 09:30:28PM -0800, Andrew Morton wrote:
> >  Attached is a simple patch to expose NGROUPS_MAX via sysctl.
> 
> Why does userspace actually care?  You try to do an oversized setgroups(),
> so you get an error?

I am systematically tracking down apps that use it.  glibc is almost free of
it.  sysconf() still uses it, but as long as the value compiled into glibc
as NGROUPS_MAX is less-than-or-equal-to the current kernel's idea, it meets
POSIX, right?  If any one goes into their kernel source and lowers
NGROUPS_MAX they might break things, but I guess that isn't too big of a
worry.  Some apps are still assuming that the value they get from sysconf()
is the absolute max number of groups.  Anyone with libc compiled against an
older kernel will see 32, when they could have 64k.

> And why does NGROUPS_MAX still exist, come to that?  AFAICT the only thing

Because Linus would not let me set it to INT_MAX. Something about
"insanity" ;)

As long as we can convince userspace apps to not trust sysconf() or
NGROUPS_MAX constants, I guess we don't *need* it exposed.  I guess that's a
veto, then? 

-- 
Tim Hockin
Sun Microsystems, Linux Software Engineering
thockin@sun.com
All opinions are my own, not Sun's

  reply	other threads:[~2004-02-20  6:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-20  2:39 PATCH: report NGROUPS_MAX via a sysctl (read-only) Tim Hockin
2004-02-20  5:30 ` Andrew Morton
2004-02-20  6:35   ` Tim Hockin [this message]
2004-02-20  6:47     ` Andrew Morton
2004-02-20  7:10       ` Tim Hockin
2004-02-25  0:59         ` Glen Turner
2004-02-25  1:14           ` Tim Hockin
2004-02-25  7:32             ` Ulrich Drepper

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=20040220063519.GP9155@sun.com \
    --to=thockin@sun.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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