Re: [PATCH v2 2/2] selftests/mm: verify droppable mappings cannot be locked

anthony.yznaga
2026-04-08T20:36:04Z

On 4/3/26 12:31 PM, Andrew Morton wrote:
> On Thu, 2 Apr 2026 16:59:33 -0700 Anthony Yznaga <anthony.yznaga@oracle.com> wrote:
>
>> For configs that support MAP_DROPPABLE verify that a mapping created
>> with MAP_DROPPABLE cannot be locked via mlock(), and that it will not
>> be locked if it's created after mlockall(MCL_FUTURE).
> There are a few queries from the AI reviewbot;
> https://sashiko.dev/#/patchset/20260402235933.10588-1-anthony.yznaga@oracle.com

Interesting. Of the two issues, one is certainly legit. I need to add an
munlockall() on early return from test_mlockall_future_droppable().
For the other, the question posed was whether the tests should handle
possibly being run on an older kernel that doesn't implement
MAP_DROPPABLE. It seems to me to that a selftest should not be expected
to work (or even necessarily compile) on kernels older than when the
selftest was introduced, but I don't want to assume.