All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Hockin <thockin@hockin.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>,
	braam@clusterfs.com, rusty@rustcorp.com.au,
	Linux Kernel mailing list <linux-kernel@vger.kernel.edu>
Subject: Re: [PATCH] Many groups patch.
Date: Wed, 1 Oct 2003 00:10:07 -0700	[thread overview]
Message-ID: <20031001071007.GA29339@hockin.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0309291609460.12684-100000@home.osdl.org>

On Mon, Sep 29, 2003 at 04:10:23PM -0700, Linus Torvalds wrote:
> > On Mon, Sep 29, 2003 at 03:43:43PM -0700, Tim Hockin wrote:
> > > My version uses a struct group_info which has an array of pages.  The groups
> 
> I'm definitely happier about this one. 
> 
> Not that I'm any more thrilled about users using thousands of groups. But 
> this looks a bit saner.

OK, then.  Here's a brushed up version against 2.6.0-test6.  Linus, if you
like this, I can get it into a public BK for you.  If not, please indicate
the issues.



Summary: Get rid of the NGROUPS hard limit.

This patch removes all fixed-size arrays which depend on NGROUPS, and
replaces them with struct group_info, which is refcounted, and holds an
array of pages in which to store groups.  groups_alloc() and groups_free()
are used to allocate and free struct group_info, and set_group_info is used
to actually put a group_info into a task.  Groups are sorted and b-searched
for efficiency.  Because groups are stored in a 2-D array, the GRP_AT()
macro was added to allow simple 1-D style indexing.

This patch touches all the compat code in the 64-bit architectures.
These files have a LOT of duplicated code from uid16.c.  I did not try to
reduce duplicated code, and instead followed suit.  A proper cleanup of
those architectures code-bases would be fun.  Any sysconf() which used to
return NGROUPS now returns INT_MAX - there is no hard limit.

This patch also touches nfsd by imposing a limit on the number of groups in
an svc_cred struct.

This patch modifies /proc/pid/status to only display the first 32 groups.

This patch removes the NGROUPS define from all architectures as well as
NGROUPS_MAX.

This patch changes the security API to check a struct group_info, rather
than an array of gid_t.

This patch totally horks Intermezzo.

This was built and tested against 2.6.0-test6 (BK today) on an i386.

  reply	other threads:[~2003-10-01 16:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1064857032.26219.linux-kernel2news@redhat.com>
2003-09-29 22:29 ` [PATCH] Many groups patch Pete Zaitcev
2003-09-29 22:43   ` Tim Hockin
2003-09-29 22:55     ` Tim Hockin
2003-09-29 23:10       ` Linus Torvalds
2003-10-01  7:10         ` Tim Hockin [this message]
2003-10-01 18:46           ` Tim Hockin
2003-10-01 19:22             ` Linus Torvalds
2003-10-01 20:29               ` Tim Hockin
2003-10-01 20:46                 ` Linus Torvalds
2003-10-01 21:12                   ` Tim Hockin
2003-10-01 21:16                   ` Tim Hockin
2003-10-02  1:00                   ` IDEA: arch uid16 cleanup (was 'Many groups patch') Tim Hockin
2003-10-02  2:09               ` [PATCH] Many groups patch Rusty Russell
2003-10-02  4:39                 ` Tim Hockin
2003-10-02  9:10                 ` David S. Miller
2003-10-02  2:25             ` Rusty Russell
2003-10-02  2:46               ` Pete Zaitcev
2003-09-29  7:19 Rusty Russell
2003-09-29 17:25 ` Linus Torvalds
2003-09-29 23:30   ` Rusty Russell
2003-09-30  4:11     ` Tim Hockin
2003-10-01  7:29       ` Rusty Russell

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=20031001071007.GA29339@hockin.org \
    --to=thockin@hockin.org \
    --cc=braam@clusterfs.com \
    --cc=linux-kernel@vger.kernel.edu \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@osdl.org \
    --cc=zaitcev@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.