[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111007001356.GA11994@tango.0pointer.de>
Date: Fri, 7 Oct 2011 02:13:56 +0200
From: Lennart Poettering <mzxreary@...inter.de>
To: Andi Kleen <andi@...stfloor.org>
Cc: Kay Sievers <kay.sievers@...y.org>, linux-kernel@...r.kernel.org,
harald@...hat.com, david@...ar.dk, greg@...ah.com
Subject: Re: A Plumber’s Wish List for Linux
On Thu, 06.10.11 16:46, Andi Kleen (andi@...stfloor.org) wrote:
>
> Kay Sievers <kay.sievers@...y.org> writes:
> >
> > * allow changing argv[] of a process without mucking with environ[]:
> > Something like setproctitle() or a prctl() would be ideal. Of course
> > it
>
> prctl(PR_SET_NAME, ...)
>
> The only problem is that some programs still use argv[] and get the old
> name, but at least it works in "top"
Well, I am aware of PR_SET_NAME, but that modifies comm, not argv[]. And
while "top" indeed shows the former, "ps" shows the latter. We are looking
for a way to nice way to modify argv[] without having to reuse space
from environ[] like most current Linux implementations of
setproctitle() do.
A while back there were patches for PR_SET_PROCTITLE_AREA floating
around. We'd like to see something like that merged one day.
> > * SCM_COMM, with a similar use case as SCM_CGROUPS. This auxiliary
> > control message should carry the process name as available
> > in /proc/$PID/comm.
>
> That sounds super racy. No guarantee at all this is unique and useful
> for anything and everyone can change it.
Well, it's interesting in the syslog case, and it's OK if people can
change it. What matters is that this information is available simply for
the informational value. Right now, if one combines SCM_CREDENTIALS and
/proc/$PID/comm you often end up with no information about the senders
name at all, since at the time you try to read comm the PID might
actually not exist anymore at all. We are simply trying to close this
particular race between receiving SCM_CREDENTIALS and reading
/proc/$PID/comm here, we are not looking for a way to make process names
trusted.
Lennart
--
Lennart Poettering - Red Hat, Inc.
--
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