On 4/20/22 3:57 PM, Sidhartha Kumar wrote:
Avoid calling mmap with requested addresses that are less than the system's mmap_min_addr. When run as root, mmap returns EACCES when trying to map addresses < mmap_min_addr. This is not one of the error codes for the condition to retry the mmap in the test. Rather than arbitrarily retrying on EACCES, don't attempt an mmap until addr > vm.mmap_min_addr. Add a munmap call after an alignment check as the mappings are retained after the retry and can reach the vm.max_map_count sysctl. Signed-off-by: Sidhartha Kumar <sidhartha.kumar@xxxxxxxxxx> --- v2: -change comment for description of get_mmap_min_addr() -fix commit message formatting
Thank you. Reviewed-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> Andrew, please let me know if you would like me to take this through kselftest tree. thanks, -- Shuah