[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1105171551450.10386@chino.kir.corp.google.com>
Date: Tue, 17 May 2011 15:56:24 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
cc: Ingo Molnar <mingo@...e.hu>, John Stultz <john.stultz@...aro.org>,
LKML <linux-kernel@...r.kernel.org>,
Joe Perches <joe@...ches.com>,
Michal Nazarewicz <mina86@...a86.com>,
Andy Whitcroft <apw@...onical.com>,
Jiri Slaby <jirislaby@...il.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Dave Hansen <dave@...ux.vnet.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org
Subject: Re: [PATCH 1/3] comm: Introduce comm_lock spinlock to protect
task->comm access
On Tue, 17 May 2011, Peter Zijlstra wrote:
> The changelog also fails to mention _WHY_ this is no longer true. Nor
> does it treat why making it true again isn't an option.
>
It's been true since:
4614a696bd1c3a9af3a08f0e5874830a85b889d4
Author: john stultz <johnstul@...ibm.com>
Date: Mon Dec 14 18:00:05 2009 -0800
procfs: allow threads to rename siblings via /proc/pid/tasks/tid/comm
Although at the time it appears that nobody was concerned about races so
proper syncronization was never implemented. We always had the
prctl(PR_SET_NAME) so the majority of comm reads, those to current,
required no locking, but this commit changed that. The remainder of comm
dereferences always required task_lock() and the helper get_task_comm() to
read the string into a (usually stack-allocated) buffer.
> Who is changing another task's comm? That's just silly.
>
I agree, and I suggested taking write privileges away from /proc/pid/comm,
but others find that it is useful to be able to differentiate between
threads in the same thread group without using the prctl() for debugging?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists