linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Tim Hockin <thockin@hockin.org>
Cc: Linus Torvalds <torvalds@osdl.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>,
	braam@clusterfs.com,
	Linux Kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Many groups patch.
Date: Thu, 02 Oct 2003 12:25:10 +1000	[thread overview]
Message-ID: <20031002022545.7D49D2C14D@lists.samba.org> (raw)
In-Reply-To: Your message of "Wed, 01 Oct 2003 11:46:11 MST." <20031001184610.GA25716@hockin.org>

In message <20031001184610.GA25716@hockin.org> you write:
> Because groups are stored in a 2-D array, the GRP_AT()
> macro was added to allow simple 1-D style indexing.

I respectfully disagree with this approach.  I don't understand why
Linus would think that 4 lines of code to fallback to vmalloc is
"ugly", when doing your own array of pages means you have to change
all the iterators and do magic when copying to and from userspace,
since it's no longer a simple array.

Tim and I have had this discussion, but I would benifit from Linus'
wisdom here.

> Groups are sorted and b-searched for efficiency.

That's where I feel Linus' comment about catering to stupidity comes
in 8)

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

Ouch, good catch, but this is broken in both our patches 8( I think we
should bump the refcount before reading it to avoid accessing freed
memory.  Now, they have to be root to access that anyway, but it just
makes me uncomfortable.

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

This will break glibc build (trivial to fix), but I agree: leaving
NGROUPS_MAX is too likely to cause people to use it inside the kernel
like intermezzo does.

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

This is why I prefer the "fall back to vmalloc" approach.

> This patch totally horks Intermezzo.

That's a feature 8)

Thanks,
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  parent reply	other threads:[~2003-10-02  2:25 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
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 [this message]
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=20031002022545.7D49D2C14D@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=thockin@hockin.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;
as well as URLs for NNTP newsgroup(s).