android_kernel_google_msm/fs/proc
Artem Bityutskiy 4ca2cf4aba proc: pid/status: show all supplementary groups
commit 8d238027b8 upstream.

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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Qiang Huang <h.huangqiang@huawei.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Jianguo Wu <wujianguo@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 06:44:15 -07:00
..
array.c proc: pid/status: show all supplementary groups 2014-04-14 06:44:15 -07:00
base.c fs/proc/base.c: fix GPF in /proc/$PID/map_files 2014-03-23 21:37:06 -07:00
cmdline.c
consoles.c
cpuinfo.c
devices.c
generic.c
inode.c vfs,proc: guarantee unique inodes in /proc 2013-11-29 10:50:30 -08:00
internal.h
interrupts.c
Kconfig
kcore.c
kmsg.c
loadavg.c
Makefile
meminfo.c
mmu.c
namespaces.c
nommu.c
page.c kpageflags: fix wrong KPF_THP on non-huge compound pages 2012-10-13 05:38:50 +09:00
proc_devtree.c
proc_net.c
proc_sysctl.c fs/proc: fix potential unregister_sysctl_table hang 2012-10-02 10:29:54 -07:00
proc_tty.c
root.c proc: fix mount -t proc -o AAA 2012-04-05 15:25:50 -07:00
softirqs.c
stat.c nohz: Fix idle ticks in cpu summary line of /proc/stat 2012-10-28 10:14:12 -07:00
task_mmu.c fs/proc/task_mmu.c: fix buffer overflow in add_page_map() 2013-08-20 08:26:27 -07:00
task_nommu.c
uptime.c
version.c
vmcore.c