Implementing UFFD_FEATURE_SIGBUS seems reasonable.
On 6/16/17 6:15 AM, Andrea Arcangeli wrote:
Adding a single if (ctx->feature & UFFD_FEATURE_SIGBUS) goto out,
branch for this corner case to handle_userfault() isn't great and the
hugetlbfs mount option is absolutely zero cost to the handle_userfault
which is primarily why I'm not against it.. although it's not going to
be measurable so it would be ok also to add such feature.
If implementing UFFD_FEATURE_SIGBUS is preferred instead of the mount option, I could look into that.