]> git.ipfire.org Git - thirdparty/man-pages.git/commit
process_madvise.2: fix capability and ptrace requirements
authorZach O'Keefe <zokeefe@google.com>
Fri, 21 Oct 2022 22:32:59 +0000 (15:32 -0700)
committerAlejandro Colomar <alx@kernel.org>
Mon, 31 Oct 2022 19:59:52 +0000 (20:59 +0100)
commit9e66831814386d24f89cf5a93c2dd24324b6c9da
treee3bf09476dd3c71cf2671d067a17eb5d596c2b09
parent3206aa60583a6702edca1423cdac2c860de59421
process_madvise.2: fix capability and ptrace requirements

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).

The initial commit of process_madvise(2) to man-pages project, made
after the second patch, included two errors:

1) CAP_SYS_ADMIN instead of CAP_SYS_NICE
2) PTRACE_MODE_READ_REALCREDS instead of PTRACE_MODE_READ_FSCREDS

Correct this in the man-page for process_madvise(2).

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