diff options
author | Lorenzo Stoakes <[email protected]> | 2024-09-26 16:10:19 +0100 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-11-05 16:56:25 -0800 |
commit | 021781b01275c07cd5b7d3e4e8afc2bdf2429a84 (patch) | |
tree | cea20c3fcdbbf379c27a84246666a10077106112 /tools/perf/scripts/python/netdev-times.py | |
parent | f33cea94e37ce10e27b192e3c5e80ff685ac7b1f (diff) |
mm/madvise: unrestrict process_madvise() for current process
The process_madvise() call was introduced in commit ecb8ac8b1f14
("mm/madvise: introduce process_madvise() syscall: an external memory
hinting API") as a means of performing madvise() operations on another
process.
However, as it provides the means by which to perform multiple madvise()
operations in a batch via an iovec, it is useful to utilise the same
interface for performing operations on the current process rather than a
remote one.
Commit 22af8caff7d1 ("mm/madvise: process_madvise() drop capability check
if same mm") removed the need for a caller invoking process_madvise() on
its own pidfd to possess the CAP_SYS_NICE capability, however this leaves
the restrictions on operation in place.
Resolve this by only applying the restriction on operations when accessing
a remote process.
Moving forward we plan to implement a simpler means of specifying this
condition other than needing to establish a self pidfd, perhaps in the
form of a sentinel pidfd.
Also take the opportunity to refactor the system call implementation
abstracting the vectorised operation.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Lorenzo Stoakes <[email protected]>
Acked-by: Shakeel Butt <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: "Liam R. Howlett" <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Pedro Falcato <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions