Re: [PATCH 4/8] selftests/mm: check that MADV_COLD and MADV_PAGEOUT reject hugetlb
From: Sarthak Sharma
Date: Mon Oct 19 2026 - 01:03:47 EST
On 10/14/26 11:27 PM, Gregory Price (Meta) wrote:
> Neither hint may be applied to hugetlb memory, so madvise(2) must fail
> with EINVAL for a hugetlb VMA. Locked VMAs are already checked here and
> PFNMAP VMAs by the pfnmap test.
>
> Check the hugetlb case for both hints.
>
> Signed-off-by: Gregory Price (Meta) <gourry@xxxxxxxxxx>
> ---
> tools/testing/selftests/mm/madvise.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
Looks good to me.
Reviewed-by: Sarthak Sharma <sarthak.sharma@xxxxxxx>