linux/tools/testing/vma
Lorenzo Stoakes (Oracle) 2d1e54aab6 mm: abstract reading sysctl_max_map_count, and READ_ONCE()
Concurrent reads and writes of sysctl_max_map_count are possible, so we
should READ_ONCE() and WRITE_ONCE().

The sysctl procfs logic already enforces WRITE_ONCE(), so abstract the
read side with get_sysctl_max_map_count().

While we're here, also move the field to mm/internal.h and add the getter
there since only mm interacts with it, there's no need for anybody else to
have access.

Finally, update the VMA userland tests to reflect the change.

Link: https://lkml.kernel.org/r/0715259eb37cbdfde4f9e5db92a20ec7110a1ce5.1773249037.git.ljs@kernel.org
Signed-off-by: Lorenzo Stoakes (Oracle) <ljs@kernel.org>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Cc: Jann Horn <jannh@google.com>
Cc: Jianzhou Zhao <luckd0g@163.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
History 2026-04-05 13:53:28 -07:00
..
include mm: abstract reading sysctl_max_map_count, and READ_ONCE() 2026-04-05 13:53:28 -07:00
linux tools: testing: use existing atomic.h for vma/maple tests 2025-09-13 16:55:25 -07:00
tests tools/testing/vma: add test for vma_flags_test(), vma_desc_test() 2026-04-05 13:53:19 -07:00
.gitignore tools: add skeleton code for userland testing of VMA logic 2024-09-01 20:25:55 -07:00
main.c mm: abstract reading sysctl_max_map_count, and READ_ONCE() 2026-04-05 13:53:28 -07:00
Makefile tools/testing/vma: add VMA userland tests for VMA flag functions 2026-02-12 15:42:59 -08:00
shared.c tools/testing/vma: separate VMA userland tests into separate files 2026-02-12 15:42:59 -08:00
shared.h tools/testing/vma: separate VMA userland tests into separate files 2026-02-12 15:42:59 -08:00
vma_internal.h tools/testing/vma: add VMA userland tests for VMA flag functions 2026-02-12 15:42:59 -08:00