[LTP] [PATCH] Modify the test logic of mincore.
Cyril Hrubis
chrubis@suse.cz
Thu Apr 15 13:05:32 CEST 2021
Hi!
> > This does not make any sense, the kernel commit explicitly states that
> > all mapped pages are reported as in core. We do call mlock() in the
> > child, which will fault all the pages and lock them in memory. So the
> > test should work both before and after the fix as well.
> >
> > The kernel commit in question weakened mincore() in a sense that it's
> > more likely to report pages in core than it previously was. Now all that
> > is needed is to fault the pages by reading some bytes from them to make
> > sure they are reported as in core.
> >
> > If the test fails for you, something is probably broken at your end.
> >
>
> Using the CVE patch on mips, the test will fail because the child
> process mlocks all pages, but the parent process cannot obtain these
> pages through mincore and is locked.
Sounds like a kernel bug.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list