Re: [PATCH] proc.5: Describe ambiguities in /proc/<pid>/maps

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

 



Hello,

On 19 July 2018 at 03:40, lineprinter <lineprinter@xxxxxxxxxxxx> wrote:
> Pathname escaping is not done properly in /proc/<pid>/maps;
> because of this, different pathnames may appear the same
> (verified by experiment and reading the source code).

I verified the behavior, but could not find the relevant piece of the
source code. Could you point me at it please.

Thanks,

Michael

> ---
>  man5/proc.5 | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/man5/proc.5 b/man5/proc.5
> index e59bd3390..38663bdff 100644
> --- a/man5/proc.5
> +++ b/man5/proc.5
> @@ -1214,6 +1214,17 @@ short of running it through
>  .BR strace (1),
>  or similar.
>  .IP
> +.I pathname
> +is shown unescaped except for newline characters, which are replaced
> +with an octal escape sequence. As a result, it is not possible to determine
> +whether the original pathname contained a newline character
> +or the literal
> +.I \\\012
> +character sequence.
> +.IP
> +If the mapping is file-backed and the file has been deleted, the string
> +" (deleted)" is appended to the pathname. Note that this is ambiguous too.
> +.IP
>  Under Linux 2.0, there is no field giving pathname.
>  .TP
>  .I /proc/[pid]/mem
> --
> 2.18.0
>



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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