[LTP] [PATCH 3/4] syscalls/mlock201: Add new testcase

Jan Stancek
2018-08-29T12:42:33Z

>
> ----- Original Message -----
> > Check the basic functionality of mlock2(2) since kernel v2.6.9.

Missed this one:
mlock2() is available since Linux 4.4.

> >
> > Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
>
> > + * Description:
> > + * Check the basic functionality of the mlock2(2) since kernel v2.6.9:
> > + * 1) Use mlock2(2) without MLOCK_ONFAULT to lock memory in the specified
> > + * range that is multiples of page size or not, and the VmLck from
> > + * /proc/PID/status shows correct size of memory that is locked by PID.
> > + * 2) Use mlock2(2) with MLOCK_ONFAULT to lock memory in the specified
> > + * range that is multiples of page size or not, and the VmLck from
> > + * /proc/PID/status show correct size of memory that is locked by PID.
>
> Can we also check if MLOCK_ONFAULT doesn't make non-present pages present,
> but it still locks present pages? (mincore(2) or /proc/pid/pagemap)
>
> Regards,
> Jan
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>