[LTP] [PATCH] openposix: mmap/21-1: use all bits set as the invalid flag

Cyril Hrubis chrubis@suse.cz
Thu Mar 1 10:50:59 CET 2018


Hi!
> The test is trying to trigger EINVAL by passing an invalid flags
> value to mmap(). Linux commit 50a8e840d050 ("mm: introduce MAP_SHARED_VALIDATE, a mechanism to safely define new mmap flags")
> introduced a new flag (MAP_SHARED_VALIDATE) and that flag may not be the last one.
> 
> So instead of adding an 'if' for each new flag we use a value with all bits
> set (which is unlikely to be a valid flag).

Acked, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list