On 04/30/2011 04:46 PM, Caspar Zhang wrote:
> 
> 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'.
> 
> v5: not using hard depend on /bin/true, use execvp() and "true" instead.
> 
> Signed-off-by: Pingtian Han <[email protected]>
> Signed-off-by: Caspar Zhang <[email protected]>
> ---
>  runtest/mm                        |    2 +
>  testcases/kernel/mem/thp/Makefile |   23 +++++++
>  testcases/kernel/mem/thp/thp01.c  |  124 
> +++++++++++++++++++++++++++++++++++++
>  3 files changed, 149 insertions(+), 0 deletions(-)
>  create mode 100644 testcases/kernel/mem/thp/Makefile
>  create mode 100644 testcases/kernel/mem/thp/thp01.c
> 

Hi all, I've modified the patch as suggested and tested it. Any comments
on this new case?

Thanks,
Caspar

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to