Fix ARM related issues in userfaultfd selftest

Following issues were observed while running userfaultfd selftest on ARM
devices. On x86_64 no issues were detected:

1) posix_memalign returned tagged pointer, which isn't handled well by
the kernel. So replace its use with mmap
2) pthread_create followed by fork caused deadlock in certain cases
wherein fork required some work to be completed by the created thread.
Used synchronization to ensure that created thread's start funtion has
started before invoking fork.

Bug: 160737021
Bug: 169683130
Test: atest vts_linux_kselftest_arm_64
Change-Id: Ifc0246689b25e8db71065c190d63d565d826cba9
2 files changed