From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Morris Subject: Re: [PATCH RFC v3 6/7] proc: support new 'pids=all|ptraceable' mount option Date: Fri, 10 Nov 2017 13:56:18 +1100 (AEDT) Message-ID: References: <1510244046-3256-1-git-send-email-tixxdz@gmail.com> <1510244046-3256-7-git-send-email-tixxdz@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <1510244046-3256-7-git-send-email-tixxdz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Djalal Harouni Cc: Kees Cook , Alexey Gladkov , Andy Lutomirski , Andrew Morton , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kernel-hardening-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8@public.gmane.org, linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Greg Kroah-Hartman , Alexander Viro , Akinobu Mita , me-xzjC0nNlxno@public.gmane.org, Oleg Nesterov , Jeff Layton , Ingo Molnar , Alexey Dobriyan , ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org, Linus Torvalds , Daniel Micay , Jonathan Corbet , bfields-uC3wQj2KruMpug/h7KTFAQ@public.gmane.org List-Id: linux-api@vger.kernel.org On Thu, 9 Nov 2017, Djalal Harouni wrote: > This patch introduces the new 'pids' mount option, as it was discussed > and suggested by Andy Lutomirski [1]. > > * If 'pids=' is passed without 'newinstance' then it has no effect. > > * If 'newinstance,pids=all' then all processes will be shown in proc. > > * If 'newinstance,pids=ptraceable' then only ptraceable processes will be > shown. > > * 'pids=' takes precendence over 'hidepid=' since 'hidepid=' can be > ignored if "gid=" was set and caller has the "gid=" set in its groups. > We want to guarantee that LSM have a security path there that can not > be disabled with "gid=". > > This allows to support lightweight sandboxes in Embedded Linux. > > Later Yama LSM can be updated to check that processes are able only > able to see their children inside /proc/, allowing to support more tight > cases. > > [1] https://lkml.org/lkml/2017/4/26/646 > > Cc: Kees Cook > Cc: Greg Kroah-Hartman > Suggested-by: Andy Lutomirski > Signed-off-by: Alexey Gladkov > Signed-off-by: Djalal Harouni Reviewed-by: James Morris -- James Morris