hugemmap/hugemmap41: Migrate ptrace-write-hugepage from libhugetlbfs
PATCH v8 1/1 hugemmap/hugemmap41: Migrate ptrace-write-hugepage from libhugetlbfs
This test verifies that ptrace POKEDATA and PEEKDATA operations work correctly on hugepage-backed memory regions. Migrating it to LTP as libhugetlbfs is not actively maintained.
---
v7 -> v8:
Replace SAFE_PTRACE(PTRACE_POKEDATA, ...) with TEST() and an explicit TFAIL check, consistent with how PTRACE_PEEKDATA is already handled.
Link to v7: https://lore.kernel.org/ltp/[email protected]/
--- runtest/hugetlb | 1 + testcases/kernel/mem/.gitignore | 1 + .../kernel/mem/hugetlb/hugemmap/hugemmap41.c | 132 ++++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 testcases/kernel/mem/hugetlb/hugemmap/hugemmap41.c
runtest/hugetlb +1 -0
@@ -40,6 +40,7 @@ hugemmap35 hugemmap35 hugemmap36 hugemmap36 hugemmap37 hugemmap37 hugemmap38 hugemmap38 +hugemmap41 hugemmap41 hugemmap05_1 hugemmap05 -m hugemmap05_2 hugemmap05 -s hugemmap05_3 hugemmap05 -s -m
testcases/kernel/mem/.gitignore +1 -0
@@ -40,6 +40,7 @@ /hugetlb/hugemmap/hugemmap36 /hugetlb/hugemmap/hugemmap37 /hugetlb/hugemmap/hugemmap38 +/hugetlb/hugemmap/hugemmap41 /hugetlb/hugeshmat/hugeshmat01 /hugetlb/hugeshmat/hugeshmat02 /hugetlb/hugeshmat/hugeshmat03
testcases/kernel/mem/hugetlb/hugemmap/hugemmap41.c new file +132 -0
132 lines not on this page · raw message
Signature · 5 lines
2.55.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Pavithra,
testcases/kernel/mem/hugetlb/hugemmap/hugemmap41.c line 97
Quoted 3 lines · Pavithra
hugemmap/hugemmap41: Migrate ptrace-write-hugepage from libhugetlbfs
testcases/kernel/mem/hugetlb/hugemmap/hugemmap41.c new file +1
-0+SAFE_PTRACE (PTRACE_ATTACH , cpid,NULL ,NULL );
Could PTRACE_ATTACH be handled without SAFE_PTRACE() so that EPERM caused by Yama policy can be reported as TCONF? With ptrace_scope=3 Linux denies every attach, including requests from root, and the wrapper converts this expected policy denial to TBROK before the test reaches PTRACE_POKEDATA.
Quoted 1 line
+/hugetlb/hugemmap/hugemmap41
Could this entry instead be placed in a .gitignore in the hugemmap leaf directory? LTP requires new test binaries to be ignored in their own test directory rather than from a parent directory.
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
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Applied, thanks.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp