[LTP] syscalls/cma: Require root for process_vm tests
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Wed Oct 14 13:24:06 CEST 2026
Hi Andrea,
On 14 October 2026, Andrea Cervesato wrote:
> syscalls/cma: Require root for process_vm tests
> diff --git a/testcases/kernel/syscalls/cma/process_vm_readv02.c b/testcases/kernel/syscalls/cma/process_vm_readv02.c
> @@ -116,6 +120,7 @@ static struct tst_test test = {
> .test_all = run,
> .setup = setup,
> .cleanup = cleanup,
> + .needs_root = 1,
> .forks_child = 1,
> .needs_checkpoints = 1,
Across all three tests, this skips valid non-root runs when Yama is
disabled or ptrace_scope=0, yet UID 0 without CAP_SYS_PTRACE still passes
the framework's geteuid() check and gets EPERM under modes 1/2.
For mode 1, have the target call prctl(PR_SET_PTRACER, getppid(), ...)
before signalling readiness to authorize the parent and its descendants,
including the sibling.
Preserve unprivileged execution where allowed and use tst_cap_action()
with TST_CAP_REQ when CAP_SYS_PTRACE is actually needed, so missing
capabilities produce TCONF.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list