Re: [PATCH v2 6/9] userfaultfd/selftests: create alias mappings in the shmem test

2021-04-13 Thread Peter Xu
On Mon, Apr 12, 2021 at 10:17:18PM -0700, Axel Rasmussen wrote: > static void shmem_allocate_area(void **alloc_area) > { > - unsigned long offset = > - alloc_area == (void **)_src ? 0 : nr_pages * page_size; > + void *area_alias = NULL; > + bool is_src = alloc_area ==

[PATCH v2 6/9] userfaultfd/selftests: create alias mappings in the shmem test

2021-04-12 Thread Axel Rasmussen
Previously, we just allocated two shm areas: area_src and area_dst. With this commit, change this so we also allocate area_src_alias, and area_dst_alias. area_*_alias and area_* (respectively) point to the same underlying physical pages, but are different VMAs. In a future commit in this series,