[LTP] [PATCH v2 2/2] Add test for CVE 2017-1000405
Li Wang
liwang@redhat.com
Thu Jul 2 11:48:23 CEST 2020
Martin Doucha <mdoucha@suse.cz> wrote:
...
> +static void *alloc_zero_page(void *baseaddr)
> +{
> + int i;
> + void *ret;
> +
> + /* Find aligned chunk of address space. MAP_HUGETLB doesn't work.
> */
> + for (i = 0; i < 16; i++, baseaddr += thp_size) {
> + ret = mmap(baseaddr, thp_size, PROT_READ,
> + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
>
I'm wondering why here request the READ ONLY memory, shouldn't we write
something into the write_thp loopingly then?
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200702/373aa7d0/attachment.htm>
More information about the ltp
mailing list