On Mon, Jan 19, 2026 at 08:59:01AM +0000, Lorenzo Stoakes wrote: > Anyway. > > Practically speaking I think there are two ways forward here (not mutually > exclusive): > > 1. Implement something in kunit or similar that explicitly tests > get_unmapped_area(). > > 2. Add a _new_ selftest, named something sensible like mmap_hint.c or > something, > that runs only on relevant arches, and does NOT try to do crazy stuff like > mapping the entire VA space, but instead simply tries some trial unhinted > mappings some hints in 48-bit space, and some hints in 52-bit space and > asserts things are as expected. > > If you do point 2, please please use a. use the kselftest_harness.h to write > the > tests in a nice way (see e.g. guard-regions.c for an example of how it's used) > and b. use the procmap helpers in vm_util.h to check on VMA ranges, you can > see > how they're used in... the merge.c tests you so deride :) > > If you or others do both/either I promise to dedicate review resource to the > series(es). That fair enough? > > Thanks, Lorenzo
It seems to me that the va_high_addr_switch test is already asserting all we need unless I'm missing something, so unless I'm much mistaken I think simply removing this test is the right way forward. A kunit test for get_unmapped_area() (if possible, as not exported) would still be useful, however. Cheers, Lorenzo

