]> git.karo-electronics.de Git - karo-tx-linux.git/commit
proc: pid/status: show all supplementary groups
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thu, 29 Nov 2012 03:18:55 +0000 (14:18 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:23:45 +0000 (16:23 +1100)
commit798d3199d847d42fd5916147552e062308235ee8
tree10ded89ad6b9fd3c6f3e371f308b87018051195a
parentdd576c0daed417977a5a97849e83bf99f255ee86
proc: pid/status: show all supplementary groups

We display a list of supplementary group for each process in
/proc/<pid>/status.  However, we show only the first 32 groups, not all of
them.

Although this is rare, but sometimes processes do have more than 32
supplementary groups, and this kernel limitation breaks user-space apps
that rely on the group list in /proc/<pid>/status.

Number 32 comes from the internal NGROUPS_SMALL macro which defines the
length for the internal kernel "small" groups buffer.  There is no
apparent reason to limit to this value.

This patch removes the 32 groups printing limit.

The Linux kernel limits the amount of supplementary groups by NGROUPS_MAX,
which is currently set to 65536.  And this is the maximum count of groups
we may possibly print.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/array.c