All of lore.kernel.org
 help / color / mirror / Atom feed
* Max groups one can be a member of linux/sched.h and NGROUPS_SMALL
@ 2004-10-28 18:02 Joseph Pingenot
  2004-10-28 18:21 ` Tim Hockin
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph Pingenot @ 2004-10-28 18:02 UTC (permalink / raw)
  To: linux-kernel

Hello.

In my quest to try and figure out the max number of groups one can be a
  member of (and to learn more about the kernel internals), I stumbled
  across the following tidbit:

(excerpted from linux/sched.h)
#define NGROUPS_SMALL           32
#define NGROUPS_PER_BLOCK       ((int)(PAGE_SIZE / sizeof(gid_t)))
struct group_info {
        int ngroups;
        atomic_t usage;
        gid_t small_block[NGROUPS_SMALL];
        int nblocks;
        gid_t *blocks[0];
};

This seems to be the place where group information is stored (linked to from
  task_struct).

So, it appears to hold 32 gids, but what is this blocks bit?  Is 32 the max
  number of groups one can be a member of?

Thanks!

-Joseph

-- 
Joseph===============================================trelane@digitasaru.net
      Graduate Student in Physics, Freelance Free Software Developer

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-28 18:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-28 18:02 Max groups one can be a member of linux/sched.h and NGROUPS_SMALL Joseph Pingenot
2004-10-28 18:21 ` Tim Hockin

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.