lkml.org 
[lkml]   [2004]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: setproctitle
Date
-----Original Message-----
From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-owner@vger.kernel.org]
On Behalf Of William Lee Irwin III
Sent: Wednesday, August 18, 2004 1:59 AM
To: DervishD
Cc: Linux-kernel
Subject: Re: setproctitle

> The command-line arguments are being fetched from the process address
> space, i.e. simply editing argv[] in userspace will have the desired
> effect. Though this code is butt ugly.

What prevents overrun when updating arg[]?

What happens to all the little ps (etc.) programs when I munge together a *really*
*long* title?

Can the entirety of arg[] be moved to a newly allocated region, if so how? (e.g.
wouldn't I have to have access to overwrite mm->arg_start etc?

I'd prefer a setthreadtitle(char * new_title) such that the individual threads in a
process (including the master thread, and so setproctitle() function is covered)
could be re-titled to declare their purposes. It would make debugging and logging a
lot easier and/or more meaningful sometimes. 8-)

It would also let the system preserve the original invocation and args for the
lifetime of the process to prevent masquerading. You know, by default the title is
the args, but the set operation would build the new title in a new kernel-controlled
place and move the pointer.

I'd be willing to work on this if there is interest.

Rob.





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.069 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site