* [PATCH] Documentation: update the description of TracerPid in procfs.rst
@ 2022-11-02 8:15 Chen Linxuan
2022-11-15 22:09 ` Jonathan Corbet
0 siblings, 1 reply; 2+ messages in thread
From: Chen Linxuan @ 2022-11-02 8:15 UTC (permalink / raw)
To: Jonathan Corbet
Cc: Chen Linxuan, Yuan Haisheng, linux-kernel, linux-fsdevel,
linux-doc
When the tracer of process is outside of current pid namespace, field
`TracerPid` in /proc/<pid>/status will be 0, too, just like this process
not have been traced.
This is because that function `task_pid_nr_ns` used to get the pid of
tracer will return 0 in this situation.
Co-authored-by: Yuan Haisheng <heysion@deepin.com>
Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
---
Documentation/filesystems/proc.rst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
index 898c99eae8e4..e98e0277f05e 100644
--- a/Documentation/filesystems/proc.rst
+++ b/Documentation/filesystems/proc.rst
@@ -245,7 +245,8 @@ It's slow but very precise.
Ngid NUMA group ID (0 if none)
Pid process id
PPid process id of the parent process
- TracerPid PID of process tracing this process (0 if not)
+ TracerPid PID of process tracing this process (0 if not, or
+ the tracer is outside of the current pid namespace)
Uid Real, effective, saved set, and file system UIDs
Gid Real, effective, saved set, and file system GIDs
FDSize number of file descriptor slots currently allocated
--
2.38.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Documentation: update the description of TracerPid in procfs.rst
2022-11-02 8:15 [PATCH] Documentation: update the description of TracerPid in procfs.rst Chen Linxuan
@ 2022-11-15 22:09 ` Jonathan Corbet
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2022-11-15 22:09 UTC (permalink / raw)
To: Chen Linxuan
Cc: Chen Linxuan, Yuan Haisheng, linux-kernel, linux-fsdevel,
linux-doc
Chen Linxuan <chenlinxuan@uniontech.com> writes:
> When the tracer of process is outside of current pid namespace, field
> `TracerPid` in /proc/<pid>/status will be 0, too, just like this process
> not have been traced.
>
> This is because that function `task_pid_nr_ns` used to get the pid of
> tracer will return 0 in this situation.
>
> Co-authored-by: Yuan Haisheng <heysion@deepin.com>
> Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
> ---
> Documentation/filesystems/proc.rst | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
> index 898c99eae8e4..e98e0277f05e 100644
> --- a/Documentation/filesystems/proc.rst
> +++ b/Documentation/filesystems/proc.rst
> @@ -245,7 +245,8 @@ It's slow but very precise.
> Ngid NUMA group ID (0 if none)
> Pid process id
> PPid process id of the parent process
> - TracerPid PID of process tracing this process (0 if not)
> + TracerPid PID of process tracing this process (0 if not, or
> + the tracer is outside of the current pid namespace)
Applied, thanks.
jon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-15 22:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-02 8:15 [PATCH] Documentation: update the description of TracerPid in procfs.rst Chen Linxuan
2022-11-15 22:09 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).