All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] proc.5: clarify cmdline mutability
       [not found] <20180919182142.3054-1-vapier@gentoo.org>
@ 2020-04-10  5:34 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; only message in thread
From: Michael Kerrisk (man-pages) @ 2020-04-10  5:34 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: mtk.manpages, linux-man

Hi Mike,

On 9/19/18 8:21 PM, Mike Frysinger wrote:
> From: Mike Frysinger <vapier@chromium.org>
> 
> The cmdline file is a window into memory that is controlled by the
> target process, and that memory may be changed arbitrarily, as can
> the window via prctl settings.  Make sure people understand that
> this file is all an illusion.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Thanks. Patch applied.

Cheers,

Michael

> ---
>  man5/proc.5 | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/man5/proc.5 b/man5/proc.5
> index c07ebf06bfa8..93b8c7d26bf3 100644
> --- a/man5/proc.5
> +++ b/man5/proc.5
> @@ -435,6 +435,18 @@ that is, a read on this file will return 0 characters.
>  The command-line arguments appear in this file as a set of
>  strings separated by null bytes (\(aq\\0\(aq),
>  with a further null byte after the last string.
> +.IP
> +If, after an
> +.BR execve (2),
> +the process modifies its argv strings, those changes will show up here.
> +This is not the same thing as modifying the argv array.
> +.IP
> +Furthermore, a process may change the memory location that this file refers via
> +.BR prctl (2)
> +operations such as
> +.BR PR_SET_MM_ARG_START .
> +.IP
> +Think of this file as the command line that the process wants you to see.
>  .TP
>  .IR /proc/[pid]/comm " (since Linux 2.6.33)"
>  .\" commit 4614a696bd1c3a9af3a08f0e5874830a85b889d4
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-10  5:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20180919182142.3054-1-vapier@gentoo.org>
2020-04-10  5:34 ` [PATCH] proc.5: clarify cmdline mutability Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.