Skip to contentSkip to conversation

/proc/<pid>/stat file documentation

DISCUSSION Szőts Ákos 2 participants 2 messages Mar 22, 2021 – Mar 24, 2021 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

Dear Michael,

I found a documentation deficiency on [1] in /proc/<pid>/stat file (Table 1-4). May I ask you to indicate in this table that ESP and EIP have non-zero values only when the process is exiting or dumping core and the calling process has the permission for PTRACE_MODE_READ_FSCREDS | PTRACE_MODE_NOAUDIT. For implementation reference see [2].

Please, also note that for many of the reported numbers in this table the aforementioned permissions are needed to be displayed correctly (as non- zeroes). They are start_code, end_code, start_stack, esp, eip, wchan, start_data, end_data, start_brk, arg_start, arg_end, env_start, env_end, and exit_code.

A small addition: I also observed that on [3] the "blog" points to 404.

Thank you and all the best,

Ákos

[1]: https://www.kernel.org/doc/html/latest/filesystems/proc.html
[2]: https://github.com/torvalds/linux/blob/master/fs/proc/array.c#L481-L502
[3]: https://www.kernel.org/doc/man-pages/maintaining.html

#1 lore raw

Hi Ákos,

Quoted 8 lines · Szőts Ákos

Dear Michael,

I found a documentation deficiency on [1] in /proc/<pid>/stat file (Table 1-4). May I ask you to indicate in this table that ESP and EIP have non-zero values only when the process is exiting or dumping core and the calling process has the permission for PTRACE_MODE_READ_FSCREDS | PTRACE_MODE_NOAUDIT. For implementation reference see [2].

You're pointing to the in-kernel documentation (link [1]). As far as I know, that's not maintained by the man-pages project, so they might not be able to help with changing that.

The man page for proc is here though:
https://man7.org/linux/man-pages/man5/procfs.5.html, maybe the info can be added there?

Quoted 8 lines

Please, also note that for many of the reported numbers in this table the aforementioned permissions are needed to be displayed correctly (as non- zeroes). They are start_code, end_code, start_stack, esp, eip, wchan, start_data, end_data, start_brk, arg_start, arg_end, env_start, env_end, and exit_code.

A small addition: I also observed that on [3] the "blog" points to 404.

I get an SSL error in Firefox ("Secure Connection Failed" and "PR_END_OF_FILE_ERROR") when trying to click the blog link
(https://blog.man7.org/).

Stefan.

Quoted 8 lines

Thank you and all the best,

Ákos

[1]: https://www.kernel.org/doc/html/latest/filesystems/proc.html
[2]: https://github.com/torvalds/linux/blob/master/fs/proc/array.c#L481-L502
[3]: https://www.kernel.org/doc/man-pages/maintaining.html