[LTP] hugemmap41: Migrate ptrace-write-hugepage from libhugetlbfs v3
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Thu Jul 2 14:31:18 CEST 2026
Hi Pavithra,
On Sat, Apr 4 2026, Pavithra wrote:
> hugemmap41: Migrate ptrace-write-hugepage from libhugetlbfs v3
The subject ends with "v3". Is that a patch revision marker that did
not get stripped before committing? If it refers to something like a
libhugetlbfs variant, please rephrase the subject to make that clear.
> +/*
> + * Test ptrace write to hugepage memory.
> + *
> + * This test verifies that ptrace POKEDATA and PEEKDATA work correctly
> + * on hugepage-backed memory regions. A child process maps a hugepage,
> + * and the parent uses ptrace to write and read data from the child's
> + * hugepage memory, ensuring that ptrace operations function properly
> + * with hugepage mappings.
> + */
The description block must open with "/*\" (backslash after the star)
so it is recognized as RST and rendered in the LTP test catalog.
Also, .needs_root = 1 is set but the block does not explain why root
is required. Ground Rule 4 requires documenting the reason here (e.g.,
ptrace(PTRACE_ATTACH) requires CAP_SYS_PTRACE when ptrace_scope > 1,
or the hugetlbfs mount operations need root).
> + SAFE_PTRACE(PTRACE_KILL, cpid, NULL, NULL);
> + SAFE_WAITPID(cpid, &status, 0);
PTRACE_KILL is deprecated. From ptrace(2): "This operation is
deprecated; do not use it!" The recommended replacement is to deliver
SIGKILL directly via kill(cpid, SIGKILL) and then wait for it.
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