Skip to contentSkip to conversation

Migrating the libhugetlbfs/testcases/stack_grow_into_huge.c test

PATCH In review Samir Mulani 2 participants 2 messages Oct 25, 2024 – Nov 1, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 Migrating the libhugetlbfs/testcases/stack_grow_into_huge.c test

Test Description:On PowerPC, the address space is divided into segments. These segments can contain either huge pages or normal pages, but not both.
All segments are initially set up to map normal pages. When a huge page mapping is created within a set of empty segments, they are "enabled" for huge pages at that time. Once enabled for huge pages, they can not be used again for normal pages for the remaining lifetime of the process.

If the segment immediately preceeding the segment containing the stack is converted to huge pages and the stack is made to grow into the this preceeding segment, some kernels may attempt to map normal pages into the huge page-only segment -- resulting in bugs.

---
v5:
--Addressed the below requested changes
1. Added support to use tst_no_corefile to set the heap rlimits
2. Removed test name form test description.
3. Ran make check and fixed the issues.

---
 runtest/hugetlb                               |   1 +
 testcases/kernel/mem/.gitignore               |   1 +
 .../kernel/mem/hugetlb/hugemmap/hugemmap34.c  | 133 ++++++++++++++++++
 3 files changed, 135 insertions(+)
 create mode 100644 testcases/kernel/mem/hugetlb/hugemmap/hugemmap34.c
runtest/hugetlb +1 -0
index f294e9aaa..0896d3c94 100644
@@ -35,6 +35,7 @@ hugemmap29 hugemmap29
 hugemmap30 hugemmap30
 hugemmap31 hugemmap31
 hugemmap32 hugemmap32
+hugemmap34 hugemmap34
 hugemmap05_1 hugemmap05 -m
 hugemmap05_2 hugemmap05 -s
 hugemmap05_3 hugemmap05 -s -m
testcases/kernel/mem/.gitignore +1 -0
index d88484fa1..699e022fb 100644
@@ -34,6 +34,7 @@
 /hugetlb/hugemmap/hugemmap30
 /hugetlb/hugemmap/hugemmap31
 /hugetlb/hugemmap/hugemmap32
+/hugetlb/hugemmap/hugemmap34
 /hugetlb/hugeshmat/hugeshmat01
 /hugetlb/hugeshmat/hugeshmat02
 /hugetlb/hugeshmat/hugeshmat03
testcases/kernel/mem/hugetlb/hugemmap/hugemmap34.c new file +133 -0

133 lines not on this page · raw message

Signature · 5 lines
2.31.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp