Commit [7bc2bb] 20110606  Maximize  Restore  History

mm: thp testcase come from CVE reproducer

This is a reproducer of CVE-2011-0999, which fixed by mainline commit
a7d6e4ecdb7648478ddec76d30d87d03d6e22b31:

"Transparent hugepages can only be created if rmap is fully functional.
So we must prevent hugepages to be created while
is_vma_temporary_stack() is true."

When running in a loop, it can trigger panic like this, if kernel
unpatched:

kernel BUG at mm/huge_memory.c:1260!
invalid opcode: 0000 [#1] SMP
last sysfs file:
/sys/devices/system/cpu/cpu23/cache/index2/shared_cpu_map
....

So I recommend to run it as 'thp01 -I xxx'.

Signed-off-by: Pingtian Han <phan@redhat.com>
Signed-off-by: Caspar Zhang <czhang@redhat.com>

Caspar Zhang Caspar Zhang 2011-05-30

Cyril Hrubis Cyril Hrubis 2011-05-31

changed runtest/mm
added testcases/kernel/mem/thp/Makefile
added testcases/kernel/mem/thp/thp01.c
runtest/mm Diff Switch to side-by-side view
Loading...
testcases/kernel/mem/thp/Makefile Diff Switch to side-by-side view
Loading...
testcases/kernel/mem/thp/thp01.c Diff Switch to side-by-side view
Loading...

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks