Skip to contentSkip to conversation

32 Groups Maximum in 2.4

DISCUSSION Jackie Meese 4 participants 7 messages Nov 15, 2001

lore
Share & tools
lore
#0 lore raw

I'm not subscribed, so please cc: me on any replies.

I've been looking for some time on how to raise the maximum number of groups for the 2.4 kernel. I've discovered how to do this kernel, with a discussion a few months ago on this list.http://www.cs.helsinki.fi/linux/linux-kernel/2001-13/0807.html

However the follow up of "You gotta change the task struct..." means nothing to me.

Can someone be more specific as to the changes that need to be made to accomplish this? Change the task struct where? I can find lots of references to task_struct in the sources simply by grepping them, but I can't since any that point to a 32 limit. I'm not a kernel hacker, but I've read and edited a fair bit of source code in my time, so I thik I just need a bit more of a clue in here.

TIA,
j.

Signature · 4 lines
Jackie Meese	Institute for Distance and Distributed Learning, Va Tech
Phone: 231-3682	3027 Torgersen Hall MailCode:0445 http://www.iddl.vt.edu/
Education is the change in behavior that occurs as the result of
interaction with events in ones environment.
#1 lore raw

It was a dark and stormy night. Suddenly "Jackie Meese" <[email protected]> began to type furiously:

Quoted 8 lines

I've been looking for some time on how to raise the maximum number of groups for the 2.4 kernel. I've discovered how to do this kernel, with a discussion a few months ago on this list.http://www.cs.helsinki.fi/linux/linux-kernel/2001-13/0807.html

However the follow up of "You gotta change the task struct..." means nothing to me.

Quoted 6 lines

Can someone be more specific as to the changes that need to be made to accomplish this? Change the task struct where? I can find lots of references to task_struct in the sources simply by grepping them, but I can't since any that point to a 32 limit. I'm not a kernel hacker, but I've read and edited a fair bit of source code in my time, so I thik I just need a bit more of a clue in here.

Look at the file "include/asm-<proc>/param.h to find the symbol "NGROUPS". Change that to whatever value you like.

The "task_struct" is the per-process descriptor. You can find it in "/usr/src/linux/include/linux/sched.h", but you shouldn't need to change anything there.

Once you've changed "NGROUPS", then "make clean oldconfig dep bzImage modules" as usual. That will change the kernel's idea how how many groups you can have. You will probably need to recompile the userland stuff, from LIBC to the shells because "NGROUPS" can be pervasive.

Your mileage may vary.

---------------------------------------------+-----------------------------

Tommy Reynolds                               | mailto: <[email protected]>
Red Hat, Inc., Embedded Development Services | Phone:  +1.256.704.9286
307 Wynn Drive NW, Huntsville, AL 35805 USA  | FAX:    +1.256.837.3839
Senior Software Developer                    | Mobile: +1.919.641.2923
#2 lore raw
Quoted 7 lines
Quoted 4 lines

I've been looking for some time on how to raise the maximum number of groups for the 2.4 kernel. I've discovered how to do this kernel, with a discussion a few months ago on this list.http://www.cs.helsinki.fi/linux/linux-kernel/2001-13/0807.html

Look at the file "include/asm-<proc>/param.h to find the symbol "NGROUPS". Change that to whatever value you like.

We have a patch that we haven't submitted yet (out of mostlyt cowardice) that makes this fully dynamic. task->groups is dynamically allocated and handled, and can grow up to a sysctl() defined maximum.

It has been working wonderfully for 10,000+ groups. Does this patch have a chance in hell of going standard?? (don't have the patch on hand, or I'd post it).

#3 lore raw
In reply to Jackie Meese
Quoted 4 lines · Jackie Meese

I've been looking for some time on how to raise the maximum number of groups for the 2.4 kernel. I've discovered how to do this kernel, with a discussion a few months ago on this list.http://www.cs.helsinki.fi/linux/linux-kernel/2001-13/0807.html

Have you considered ACLs instead? http://acl.bestbits.at/
Also available for ext3 (I think reiserfs may also support ACLs, not sure). It might not suit your needs, but maybe it does, and it is a better long-term solution.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

#4 lore raw
In reply to Jackie Meese
Quoted 9 lines · Andreas Dilger
Quoted 2 lines · Jackie Meese

I've been looking for some time on how to raise the maximum number of groups for the 2.4 kernel. I've discovered how to do this kernel, with a discussion a few months ago on this list.http://www.cs.helsinki.fi/linux/linux-kernel/2001-13/0807.html

Have you considered ACLs instead? http://acl.bestbits.at/
Also available for ext3 (I think reiserfs may also support ACLs, not sure). It might not suit your needs, but maybe it does, and it is a better long-term solution.

The current backup software used for our servers is one big reason for writing off ACL fairly quickly. Having to check for compatability on other software we use is another reason this was ruled out.

Signature · 4 lines
Jackie Meese	Institute for Distance and Distributed Learning, Va Tech
Phone: 231-3682	3027 Torgersen Hall MailCode:0445 http://www.iddl.vt.edu/
Education is the change in behavior that occurs as the result of
interaction with events in ones environment.
#5 lore raw
Quoted 5 lines
Quoted 1 line

Have you considered ACLs instead? http://acl.bestbits.at/

The current backup software used for our servers is one big reason for writing off ACL fairly quickly. Having to check for compatability on other software we use is another reason this was ruled out.

Bingo.

#6 lore raw
In reply to Jackie Meese
Quoted 7 lines · Jackie Meese
Quoted 6 lines · Andreas Dilger
Quoted 4 lines · Jackie Meese

I've been looking for some time on how to raise the maximum number of groups for the 2.4 kernel. I've discovered how to do this kernel, with a discussion a few months ago on this list.http://www.cs.helsinki.fi/linux/linux-kernel/2001-13/0807.html

Quoted 8 lines
Quoted 4 lines

Have you considered ACLs instead? http://acl.bestbits.at/
Also available for ext3 (I think reiserfs may also support ACLs, not sure). It might not suit your needs, but maybe it does, and it is a better long-term solution.

The current backup software used for our servers is one big reason for writing off ACL fairly quickly. Having to check for compatability on other software we use is another reason this was ruled out.

Actually not. If you want to save/restore ACLs, you can easily do something like the following before each backup:

getfacl -R --skip_base > .acl_backup

and if you need to restore ACLs, you to the reverse after a restore:

setacl --restore=.acl_backup

This puts the ACLs into a regular file that any backup system can handle.

The EA/ACL support will _likely_ be put into 2.5, so it will probably be easier to use this than to always patch to support > 32 groups, including all of the user tools, etc (which AFAIK is not anywhere on the radar to go into the stock kernel, especially since it impacts the fast-path for _every_ process either by making the tast struct bigger, or requiring an extra dereference to get at a dynamically-allocated group list).

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/