* proc(5): /proc/[number]/cmdline explanation update
@ 2008-02-06 6:14 Fernando Luis Vázquez Cao
[not found] ` <1202278450.3897.32.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Fernando Luis Vázquez Cao @ 2008-02-06 6:14 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
It used to be true that the command line arguments were not accessible
when the process had been swapped out. In ancient kernels (circa 2.0.*)
the problem was that the kernel relied on get_phys_addr to access the
user space buffer, which stopped working as soon as the process was
swapped out. Recent kernels use get_user_pages for the same purpose and
thus they should not have that limitation.
Signed-off-by: Fernando Luis Vazquez Cao <fernando-gVGce1chcLdL9jVzuh4AOg@public.gmane.org>
---
--- proc.5.orig 2008-02-06 14:11:58.000000000 +0900
+++ proc.5 2008-02-06 14:56:22.000000000 +0900
@@ -87,12 +87,11 @@ plus one \fIunsigned long\fP value for e
The last entry contains two zeros.
.TP
.I /proc/[number]/cmdline
-This holds the complete command line for the process, unless the whole
-process has been swapped out or the process is a zombie.
-In either of these latter cases, there is nothing in this file:
-that is, a read on this file will return 0 characters.
-The command line arguments appear in this file as a set of
-null-separated strings, with a further null byte after the last string.
+This holds the complete command line for the process, unless the process is a
+zombie. In the latter case, there is nothing in this file: that is, a read on
+this file will return 0 characters. The command line arguments appear in this
+file as a set of null-separated strings, with a further null byte after the
+last string.
.TP
.I /proc/[number]/cwd
This is a symbolic link to the current working directory of the process.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: proc(5): /proc/[number]/cmdline explanation update
[not found] ` <1202278450.3897.32.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
@ 2008-02-11 16:30 ` Michael Kerrisk
[not found] ` <47B0780D.2090501-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Michael Kerrisk @ 2008-02-11 16:30 UTC (permalink / raw)
To: Fernando Luis Vázquez Cao; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
Fernando,
Do you know when (which kernel version) this change in behavior occurred?
Cheers,
Michael
Fernando Luis Vázquez Cao wrote:
> It used to be true that the command line arguments were not accessible
> when the process had been swapped out. In ancient kernels (circa 2.0.*)
> the problem was that the kernel relied on get_phys_addr to access the
> user space buffer, which stopped working as soon as the process was
> swapped out. Recent kernels use get_user_pages for the same purpose and
> thus they should not have that limitation.
>
> Signed-off-by: Fernando Luis Vazquez Cao <fernando-gVGce1chcLdL9jVzuh4AOg@public.gmane.org>
> ---
>
> --- proc.5.orig 2008-02-06 14:11:58.000000000 +0900
> +++ proc.5 2008-02-06 14:56:22.000000000 +0900
> @@ -87,12 +87,11 @@ plus one \fIunsigned long\fP value for e
> The last entry contains two zeros.
> .TP
> .I /proc/[number]/cmdline
> -This holds the complete command line for the process, unless the whole
> -process has been swapped out or the process is a zombie.
> -In either of these latter cases, there is nothing in this file:
> -that is, a read on this file will return 0 characters.
> -The command line arguments appear in this file as a set of
> -null-separated strings, with a further null byte after the last string.
> +This holds the complete command line for the process, unless the process is a
> +zombie. In the latter case, there is nothing in this file: that is, a read on
> +this file will return 0 characters. The command line arguments appear in this
> +file as a set of null-separated strings, with a further null byte after the
> +last string.
> .TP
> .I /proc/[number]/cwd
> This is a symbolic link to the current working directory of the process.
>
>
>
--
Michael Kerrisk
Maintainer of the Linux man-pages project
http://www.kernel.org/doc/man-pages/
Want to report a man-pages bug? Look here:
http://www.kernel.org/doc/man-pages/reporting_bugs.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: proc(5): /proc/[number]/cmdline explanation update
[not found] ` <47B0780D.2090501-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2008-02-12 5:47 ` Fernando Luis Vázquez Cao
[not found] ` <1202795266.22621.16.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Fernando Luis Vázquez Cao @ 2008-02-12 5:47 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
Hi Michael,
It seems the old description applies to all 2.0, 2.2, and 2.3 kernels up
to and including 2.3.26. After that the behavior changed as explained in
my patch.
Regards,
Fernando
On Mon, 2008-02-11 at 17:30 +0100, Michael Kerrisk wrote:
> Fernando,
>
> Do you know when (which kernel version) this change in behavior occurred?
>
> Cheers,
>
> Michael
>
> Fernando Luis Vázquez Cao wrote:
> > It used to be true that the command line arguments were not accessible
> > when the process had been swapped out. In ancient kernels (circa 2.0.*)
> > the problem was that the kernel relied on get_phys_addr to access the
> > user space buffer, which stopped working as soon as the process was
> > swapped out. Recent kernels use get_user_pages for the same purpose and
> > thus they should not have that limitation.
> >
> > Signed-off-by: Fernando Luis Vazquez Cao <fernando-gVGce1chcLdL9jVzuh4AOg@public.gmane.org>
> > ---
> >
> > --- proc.5.orig 2008-02-06 14:11:58.000000000 +0900
> > +++ proc.5 2008-02-06 14:56:22.000000000 +0900
> > @@ -87,12 +87,11 @@ plus one \fIunsigned long\fP value for e
> > The last entry contains two zeros.
> > .TP
> > .I /proc/[number]/cmdline
> > -This holds the complete command line for the process, unless the whole
> > -process has been swapped out or the process is a zombie.
> > -In either of these latter cases, there is nothing in this file:
> > -that is, a read on this file will return 0 characters.
> > -The command line arguments appear in this file as a set of
> > -null-separated strings, with a further null byte after the last string.
> > +This holds the complete command line for the process, unless the process is a
> > +zombie. In the latter case, there is nothing in this file: that is, a read on
> > +this file will return 0 characters. The command line arguments appear in this
> > +file as a set of null-separated strings, with a further null byte after the
> > +last string.
> > .TP
> > .I /proc/[number]/cwd
> > This is a symbolic link to the current working directory of the process.
> >
> >
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: proc(5): /proc/[number]/cmdline explanation update
[not found] ` <1202795266.22621.16.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
@ 2008-02-14 18:54 ` Michael Kerrisk
0 siblings, 0 replies; 4+ messages in thread
From: Michael Kerrisk @ 2008-02-14 18:54 UTC (permalink / raw)
To: Fernando Luis Vázquez Cao
Cc: Michael Kerrisk, linux-man-u79uwXL29TY76Z2rM5mHXA
Fernando Luis Vázquez Cao wrote:
> Hi Michael,
>
> It seems the old description applies to all 2.0, 2.2, and 2.3 kernels up
> to and including 2.3.26. After that the behavior changed as explained in
> my patch.
Thanks. Patch applied for man-pages-2.79.
Cheers,
Michael
> Fernando
>
> On Mon, 2008-02-11 at 17:30 +0100, Michael Kerrisk wrote:
>> Fernando,
>>
>> Do you know when (which kernel version) this change in behavior occurred?
>>
>> Cheers,
>>
>> Michael
>>
>> Fernando Luis Vázquez Cao wrote:
>>> It used to be true that the command line arguments were not accessible
>>> when the process had been swapped out. In ancient kernels (circa 2.0.*)
>>> the problem was that the kernel relied on get_phys_addr to access the
>>> user space buffer, which stopped working as soon as the process was
>>> swapped out. Recent kernels use get_user_pages for the same purpose and
>>> thus they should not have that limitation.
>>>
>>> Signed-off-by: Fernando Luis Vazquez Cao <fernando-gVGce1chcLdL9jVzuh4AOg@public.gmane.org>
>>> ---
>>>
>>> --- proc.5.orig 2008-02-06 14:11:58.000000000 +0900
>>> +++ proc.5 2008-02-06 14:56:22.000000000 +0900
>>> @@ -87,12 +87,11 @@ plus one \fIunsigned long\fP value for e
>>> The last entry contains two zeros.
>>> .TP
>>> .I /proc/[number]/cmdline
>>> -This holds the complete command line for the process, unless the whole
>>> -process has been swapped out or the process is a zombie.
>>> -In either of these latter cases, there is nothing in this file:
>>> -that is, a read on this file will return 0 characters.
>>> -The command line arguments appear in this file as a set of
>>> -null-separated strings, with a further null byte after the last string.
>>> +This holds the complete command line for the process, unless the process is a
>>> +zombie. In the latter case, there is nothing in this file: that is, a read on
>>> +this file will return 0 characters. The command line arguments appear in this
>>> +file as a set of null-separated strings, with a further null byte after the
>>> +last string.
>>> .TP
>>> .I /proc/[number]/cwd
>>> This is a symbolic link to the current working directory of the process.
>>>
>>>
>>>
>
>
--
Michael Kerrisk
Maintainer of the Linux man-pages project
http://www.kernel.org/doc/man-pages/
Want to report a man-pages bug? Look here:
http://www.kernel.org/doc/man-pages/reporting_bugs.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-14 18:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-06 6:14 proc(5): /proc/[number]/cmdline explanation update Fernando Luis Vázquez Cao
[not found] ` <1202278450.3897.32.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
2008-02-11 16:30 ` Michael Kerrisk
[not found] ` <47B0780D.2090501-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-02-12 5:47 ` Fernando Luis Vázquez Cao
[not found] ` <1202795266.22621.16.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
2008-02-14 18:54 ` Michael Kerrisk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox