aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mm/debug_page_alloc.c
diff options
context:
space:
mode:
authorDev Jain <dev.jain@arm.com>2024-03-21 16:05:22 +0530
committerAndrew Morton <akpm@linux-foundation.org>2024-04-25 20:56:01 -0700
commit0104096498858346e3ac0668add1bf682461d4aa (patch)
tree89772645074aac8661d6d5bac0a37e10eb2fcbdb /mm/debug_page_alloc.c
parenthugetlb: remove mention of destructors (diff)
downloadwireguard-linux-0104096498858346e3ac0668add1bf682461d4aa.tar.xz
wireguard-linux-0104096498858346e3ac0668add1bf682461d4aa.zip
selftests/mm: confirm VA exhaustion without reliance on correctness of mmap()
Currently, VA exhaustion is being checked by passing a hint to mmap() and expecting it to fail. While populating the lower VA space, mmap() fails because we have exhausted the space. Then, in validate_lower_address_hint(), because mmap() fails, we confirm that we have indeed exhausted the space. There is a circular logic involved here. Assume that there is a bug in mmap(), also assume that it exists independent of whether you pass a hint address or not; that for some reason it is not able to find a 1GB chunk. My idea is to assert the exhaustion against some other method. This patch makes a stricter test by successful write() calls from /proc/self/maps to a dump file, confirming that a free chunk is indeed not available. [dev.jain@arm.com: replace SZ_1GB with MAP_CHUNK_SIZE, tidy-up] Link: https://lkml.kernel.org/r/20240325042653.867055-1-dev.jain@arm.com Link: https://lkml.kernel.org/r/20240321103522.516097-1-dev.jain@arm.com Signed-off-by: Dev Jain <dev.jain@arm.com> Cc: Anshuman Khandual <anshuman.khandual@arm.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/debug_page_alloc.c')
0 files changed, 0 insertions, 0 deletions