On Linux 5.7+, the kernel retries faults which is causing the uffd tests to
hang because the UffdRegion wakes invalid page accesses expecting the kernel
to signal SIGBUS rather than retry the fault.
This fix attempts to work around the recent kernel behavior by changing the
page protection to NONE for an invalid page access. The access is reset when
the Alloc is dropped or when the instance is reset.
On Linux 5.7+, the kernel retries faults which is causing the uffd tests to hang because the
UffdRegion
wakes invalid page accesses expecting the kernel to signalSIGBUS
rather than retry the fault.This fix attempts to work around the recent kernel behavior by changing the page protection to
NONE
for an invalid page access. The access is reset when theAlloc
is dropped or when the instance is reset.