Re: [PATCH] selftests/vm: Add a test for MAP_FIXED_NOREPLACE
From: Michael Ellerman
Date: Mon Oct 15 2018 - 20:17:22 EST
Michal Hocko <mhocko@xxxxxxxxxx> writes:
> On Sun 14-10-18 00:39:29, Michael Ellerman wrote:
>> Add a test for MAP_FIXED_NOREPLACE, based on some code originally by
>> Jann Horn. This would have caught the overlap bug reported by Daniel Micay.
>>
>> I originally suggested to Michal that we create MAP_FIXED_NOREPLACE, but
>> instead of writing a selftest I spent my time bike-shedding whether it
>> should be called MAP_FIXED_SAFE/NOCLOBBER/WEAK/NEW .. mea culpa.
>
> You wer one of those to provide a useful feedback actually. So no reason
> to feel sorry. I should have been forced to write a test case instead.
> No idea why I haven't considered that myself actually. So I steal your
> culpa here.
Haha, plenty of culpa to go around :)
Yeah we should try to always have selftests for new flags and things
like this.
This one was a bit special because the original point of the new flag
was for the kernel to use internally, and we sort of forgot that we were
also adding a user-visible flag.
>> Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
>
> Thanks for doing this!
> Acked-by: Michal Hocko <mhocko@xxxxxxxx>
Thanks.
cheers