On Sat, Oct 12, 2019 at 12:16 PM Daniel Colascione <dancol@xxxxxxxxxx> wrote: > > This change adds 2 as an allowable value for > unprivileged_userfaultfd. (Previously, this sysctl could be either 0 > or 1.) When unprivileged_userfaultfd is 2, users with CAP_SYS_PTRACE > may create userfaultfd with or without UFFD_SECURE, but users without > CAP_SYS_PTRACE must pass UFFD_SECURE to userfaultfd in order for the > system call to succeed, effectively forcing them to opt into > additional security checks. This patch can go away entirely if you make UFFD_SECURE automatic.