linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Suren Baghdasaryan <surenb@google.com>
To: Zach OKeefe <zokeefe@google.com>
Cc: Alejandro Colomar <alx.manpages@gmail.com>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	 Yang Shi <shy828301@gmail.com>,
	linux-mm@kvack.org, linux-man@vger.kernel.org,
	 Minchan Kim <minchan@kernel.org>
Subject: Re: [PATCH man-pages v2 3/4] process_madvise.2: CAP_SYS_ADMIN cleanup
Date: Tue, 18 Oct 2022 17:11:55 -0700	[thread overview]
Message-ID: <CAJuCfpE+nWiRAfDY+W5n4u1_vU82APF_4k0sgsFbh3GR3SOcwA@mail.gmail.com> (raw)
In-Reply-To: <20221018235051.152548-4-zokeefe@google.com>

On Tue, Oct 18, 2022 at 4:51 PM Zach OKeefe <zokeefe@google.com> wrote:
>
> From: Zach O'Keefe <zokeefe@google.com>
>
> The initial commit of process_madvise(2) to man-pages project included
> an error, indicating that CAP_SYS_ADMIN capability was required when, in
> fact, CAP_SYS_NICE was the required capability.
>
> The initial commit of process_madvise(2) to Linux, commit ecb8ac8b1f14
> ("mm/madvise: introduce process_madvise() syscall: an external memory
> hinting API"), relied on PTRACE_MODE_ATTACH_FSCREDS (see ptrace(2)),
> but was amended by commit 96cfe2c0fd23 ("mm/madvise: replace ptrace
> attach requirement for process_madvise") which replaced this with a
> combination of PTRACE_MODE_READ and CAP_SYS_NICE (PTRACE_MODE_READ to
> prevent leaking ASLR metadata and CAP_SYS_NICE for influencing process
> performance).
>
> Correct this in the man-page for process_madvise(2).

Thanks for fixing my mistake!

>
> Fixes: a144f458b ("process_madvise.2: Document process_madvise(2)")
> Cc: Suren Baghdasaryan <surenb@google.com>
> Cc: Minchan Kim <minchan@kernel.org>
> Signed-off-by: Zach O'Keefe <zokeefe@google.com>

Reviewed-by: Suren Baghdasaryan <surenb@google.com>

> ---
>  man2/process_madvise.2 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/man2/process_madvise.2 b/man2/process_madvise.2
> index 6208206e4..7bee1a098 100644
> --- a/man2/process_madvise.2
> +++ b/man2/process_madvise.2
> @@ -113,7 +113,8 @@ check (see
>  in addition,
>  because of the performance implications of applying the advice,
>  the caller must have the
> -.B CAP_SYS_ADMIN
> +.\" commit 96cfe2c0fd23ea7c2368d14f769d287e7ae1082e
> +.B CAP_SYS_NICE
>  capability.
>  .SH RETURN VALUE
>  On success,
> --
> 2.38.0.413.g74048e4d9e-goog
>


  reply	other threads:[~2022-10-19  0:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 23:50 [PATCH man-pages v2 0/4] Add MADV_COLLAPSE documentation Zach OKeefe
2022-10-18 23:50 ` [PATCH man-pages v2 1/4] madvise.2: update THP file/shmem documentation for +5.4 Zach OKeefe
2022-10-18 23:50 ` [PATCH man-pages v2 2/4] madvise.2: document reliable probe for advice support Zach OKeefe
2022-10-18 23:50 ` [PATCH man-pages v2 3/4] process_madvise.2: CAP_SYS_ADMIN cleanup Zach OKeefe
2022-10-19  0:11   ` Suren Baghdasaryan [this message]
2022-10-21 12:37   ` Alejandro Colomar
2022-10-21 12:41     ` Alejandro Colomar
2022-10-21 16:16       ` Zach O'Keefe
2022-10-21 16:30         ` Alejandro Colomar
2022-10-18 23:50 ` [PATCH man-pages v2 4/4] madvise.2: add documentation for MADV_COLLAPSE Zach OKeefe

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=CAJuCfpE+nWiRAfDY+W5n4u1_vU82APF_4k0sgsFbh3GR3SOcwA@mail.gmail.com \
    --to=surenb@google.com \
    --cc=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=shy828301@gmail.com \
    --cc=zokeefe@google.com \
    /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