From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Rapoport Subject: Re: [PATCH 1/1] userfaultfd: require CAP_SYS_PTRACE for UFFD_FEATURE_EVENT_FORK Date: Thu, 7 Nov 2019 10:39:03 +0200 Message-ID: <20191107083902.GB3247@linux.ibm.com> References: <1572967777-8812-1-git-send-email-rppt@linux.ibm.com> <1572967777-8812-2-git-send-email-rppt@linux.ibm.com> <20191105162424.GH30717@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Daniel Colascione Cc: Andrea Arcangeli , Andy Lutomirski , linux-kernel , Andrew Morton , Jann Horn , Linus Torvalds , Lokesh Gidra , Nick Kralevich , Nosh Minwalla , Pavel Emelyanov , Tim Murray , Linux API , linux-mm List-Id: linux-api@vger.kernel.org Hi Daniel, On Tue, Nov 05, 2019 at 08:41:18AM -0800, Daniel Colascione wrote: > On Tue, Nov 5, 2019 at 8:24 AM Andrea Arcangeli wrote: > > The long term plan is to introduce UFFD_FEATURE_EVENT_FORK2 feature > > flag that uses the ioctl to receive the child uffd, it'll consume more > > CPU, but it wouldn't require the PTRACE privilege anymore. > > Why not just have callers retrieve FDs using recvmsg? This way, you > retrieve the message packet and the file descriptor at the same time > and you don't need any appreciable extra CPU use. I don't follow you here. Can you elaborate on how recvmsg would be used in this case? -- Sincerely yours, Mike.