public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Keno Fischer <keno@juliacomputing.com>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org
Subject: Re: [PATCH] proc.5: Fix an outdated note about map_files
Date: Mon, 13 Apr 2020 09:31:44 +0200	[thread overview]
Message-ID: <93fcc787-544d-7dbc-f389-d7dc9ca3ad28@gmail.com> (raw)
In-Reply-To: <20200412080930.GA30569@juliacomputing.com>

Hello Keno,

On 4/12/20 10:09 AM, Keno Fischer wrote:
> The restriction to CAP_SYS_ADMIN was removed from map_files in 2015 [1].
> There was a fixme that indicted this might happen, but the main text was
> never updated when this commit landed. While we're at it, add a note about
> the ptrace access check that is still required.>
> [1] https://github.com/torvalds/linux/commit/bdb4d100afe9818aebd1d98ced575c5ef143456c
> 
> Signed-off-by: Keno Fischer <keno@juliacomputing.com>

Thank you. Such a nicely written patch!

The FIXME was mine, bit obviously I lost the plot after I wrote it.
Thanks for catching this.

Patch applied.

Cheers,

Michael


> ---
>  man5/proc.5 | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/man5/proc.5 b/man5/proc.5
> index 34cb957dd..0d6043c8f 100644
> --- a/man5/proc.5
> +++ b/man5/proc.5
> @@ -1090,16 +1090,18 @@ lrw\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:33
>  .EE
>  .in
>  .IP
> -This directory appears only if the
> +Permission to access this file is governed by a ptrace access mode
> +.B PTRACE_MODE_READ_FSCREDS
> +check; see
> +.BR ptrace (2).
> +.IP
> +.\" This permissions check got removed in kernel commit bdb4d100a
> +Until kernel version 4.3, this directory appeared only if the
>  .B CONFIG_CHECKPOINT_RESTORE
> -kernel configuration option is enabled.
> -Privilege
> +kernel configuration option was enabled.
> +Additionally, in those kernel versions, privilege
>  .RB ( CAP_SYS_ADMIN )
> -.\" FIXME
> -.\" This may change. See the mail thread
> -.\" "[RFC][PATCH v2] procfs: Always expose /proc/<pid>/map_files/ and make it readable"
> -.\" from Jan 2015
> -is required to view the contents of this directory.
> +was required to view the contents of this directory.
>  .TP
>  .I /proc/[pid]/maps
>  A file containing the currently mapped memory regions and their access
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

      reply	other threads:[~2020-04-13  7:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-12  8:09 [PATCH] proc.5: Fix an outdated note about map_files Keno Fischer
2020-04-13  7:31 ` Michael Kerrisk (man-pages) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93fcc787-544d-7dbc-f389-d7dc9ca3ad28@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=keno@juliacomputing.com \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox