Enable proc fs to print more than 32 groups entries
authorYan Yin <yan.yin@intel.com>
Tue, 21 Feb 2012 09:23:26 +0000 (17:23 +0800)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:28:15 +0000 (12:28 +0300)
commit43d1d0f8fb3511ec4c19e8eb397e53e7b851ff43
treec8273e707a5b191052539ef95b10200074f5054f
parent63e24c75479690a69eccb953469f247edebdeb06
Enable proc fs to print more than 32 groups entries

from security-server-0.0.1/include/SLP_security-server_PG.h:

"In kernel version 2.6, there is a file in proc file system
"/proc/[pid]/status" which describes various information about the
process as text, it has a line named "Groups:" and it lists the group
IDs that the process is belonged to. B
ut there is a drawback in this file, it only shows at most 32 group IDs,
if number of groups of the process is bigger than 32, it ignores
them.
To enable to show all the groups you have to patch the kernel source
code to show more groups than 32, but there is another drawback. All
files in the proc file system has size limit to 4k bytes because the
file buffer size is 4k bytes, so it's not possible to show all possible
groups of the process(64k), but currently number of all groups in the
LiMo platform is much lower than the size, so it's not a big problem.
But near future we need to apply this patch into kernel mainline source
code by any form.
fs/proc/array.c