[PATCH] proc.5: clarify cmdline mutability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mike Frysinger <vapier@xxxxxxxxxxxx>

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@xxxxxxxxxx>
---
 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
-- 
2.17.1




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux