On 15/04/2024 15:21, Amit Daniel Kachhap wrote:
SYSCALL_DEFINE5(process_madvise, int, pidfd, const struct iovec __user *, vec, @@ -1506,7 +1523,7 @@ SYSCALL_DEFINE5(process_madvise, int, pidfd, const struct iovec __user *, vec, while (iov_iter_count(&iter)) { ret = do_madvise(mm, user_ptr_addr(iter_iov_addr(&iter)),
iter_iov_len(&iter), behavior);
iter_iov_len(&iter), behavior, false);
process_madvise() should only check capabilities if targeting the current process (see the spec). For now let's just skip the checks by passing true.
Kevin
if (ret < 0) break; iov_iter_advance(&iter, iter_iov_len(&iter));