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.