tools: testing: add simple __mmap_region() userland test
authorLorenzo Stoakes <lorenzo.stoakes@oracle.com>
Fri, 13 Dec 2024 16:24:09 +0000 (16:24 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 26 Jan 2025 04:22:18 +0000 (20:22 -0800)
commit7e8c8fd3487c41690ebaf1f37218d8e191d45166
tree7e7d191be03213955edb9e5fa4c88c7b4944c7c3
parentec838c7da584529bb74c8123fcea6f5f122b2128
tools: testing: add simple __mmap_region() userland test

Introduce demonstrative, basic, __mmap_region() test upon which we can
base further work upon moving forwards.

This simply asserts that mappings can be made and merges occur as
expected.

As part of this change, fix the security_vm_enough_memory_mm() stub which
was previously incorrectly implemented.

Link: https://lkml.kernel.org/r/20241213162409.41498-1-lorenzo.stoakes@oracle.com
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Jann Horn <jannh@google.com>
Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/vma/vma.c
tools/testing/vma/vma_internal.h