ACK: [PATCH] [Xenial] procfs: fix pthread cross-thread naming if !PR_DUMPABLE

Seth Forshee seth.forshee at
Wed May 17 14:01:23 UTC 2017

On Thu, May 11, 2017 at 06:10:19PM -0300, Breno Leitao wrote:
> From: Janis Danisevskis <jdanis at>
> BugLink:
> The PR_DUMPABLE flag causes the pid related paths of the proc file
> system to be owned by ROOT.
> The implementation of pthread_set/getname_np however needs access to
> /proc/<pid>/task/<tid>/comm.  If PR_DUMPABLE is false this
> implementation is locked out.
> This patch installs a special permission function for the file "comm"
> that grants read and write access to all threads of the same group
> regardless of the ownership of the inode.  For all other threads the
> function falls back to the generic inode permission check.
> [akpm at fix spello in comment]
> Signed-off-by: Janis Danisevskis <jdanis at>
> Acked-by: Kees Cook <keescook at>
> Cc: Al Viro <viro at>
> Cc: Cyrill Gorcunov <gorcunov at>
> Cc: Alexey Dobriyan <adobriyan at>
> Cc: Colin Ian King <colin.king at>
> Cc: David Rientjes <rientjes at>
> Cc: Minfei Huang <mnfhuang at>
> Cc: John Stultz <john.stultz at>
> Cc: Calvin Owens <calvinowens at>
> Cc: Jann Horn <jann at>
> Signed-off-by: Andrew Morton <akpm at>
> Signed-off-by: Linus Torvalds <torvalds at>
> (cherry picked from commit 1b3044e39a89cb1d4d5313da477e8dfea2b5232d)
> Signed-off-by: Breno Leitao <breno.leitao at>

Clean cherry pick, has been upstream since 4.7.

Acked-by: Seth Forshee <seth.forshee at>

More information about the kernel-team mailing list