Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp511176pja; Thu, 7 Nov 2019 00:40:24 -0800 (PST) X-Google-Smtp-Source: APXvYqyd42LXYXua+UQrTew7Q6BaUBL0L+NLs5WP8EalF4/kwcp3lnUWuOlx0WZ2AkJiexhSFc/p X-Received: by 2002:a05:6402:70e:: with SMTP id w14mr2177882edx.95.1573116024124; Thu, 07 Nov 2019 00:40:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573116024; cv=none; d=google.com; s=arc-20160816; b=FenYdQzgS9n3D1OfUSXeBHP1uVLWJ+QNZ4Myf+L7VrqiJcn61XxKayUeabxQDGFXSI tWYp08oh8K1prED2m+e3eCoYc6524idM8jvTURJPezaPv+8gJUqCMvTKVFxaaBbv4qTk pMPv0ArebqCPb4CBaw7m9GSLe3C9oVmTQ9fW0Mb8Sh96Kd0/fb5Ik4t/cl+NQKpoNx3M MU+3Fxy1CtU7PG3xazkxsJfzrD3Y7AKUJOY5epdeaS2eFY82WmED2vQqBBbMu7TInbLd NM5hPRvBivp4pcIKH6aIQGuZi2XTawLDxGf8kISpHxfcPCW77FjhTY3395GOZ5m0TAe8 MYKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=XbYsaMs4CV9YEolo3v6LAkwhjJ5mxqyE1grVPB6ICts=; b=1Dr6a26lsnNhix+DLSGsMdiBBRSHwV9BQwjJFW6pMRcittAQ8tsu2pP7G9IJmluB7g 9lbO8kE02yy2xemIOvXMjXomRbzWFH6NqV4L6/47ur0e6rXre6sfWgGNag6tXQ6a8oHQ YqobkEO1/WyUxyrC7hHa7mRs7G5tarQwDia3evItPT8e6U1lZTXvd7tADwGi5vX/7Tof dXzHL06XX2NBFgveDa+HEhvjT9eZyOTJNfmmWa2lWa9AoI4PBjJ94439s7vUgYnyU4/1 WDFXq/jNlOuJnkwz9c/Kx0QISmlB2XWEl85b9jkoPtr0N2aQo/fECxyO8tZ5//taee0Z pwPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si995358edj.424.2019.11.07.00.40.00; Thu, 07 Nov 2019 00:40:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733112AbfKGIjR (ORCPT + 99 others); Thu, 7 Nov 2019 03:39:17 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:30332 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727120AbfKGIjQ (ORCPT ); Thu, 7 Nov 2019 03:39:16 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id xA78OeC2078980 for ; Thu, 7 Nov 2019 03:39:15 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2w4djmn76u-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 07 Nov 2019 03:39:15 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Nov 2019 08:39:12 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 7 Nov 2019 08:39:06 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xA78d5jE47382630 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 Nov 2019 08:39:05 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BE48FA405F; Thu, 7 Nov 2019 08:39:05 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B4549A4054; Thu, 7 Nov 2019 08:39:04 +0000 (GMT) Received: from linux.ibm.com (unknown [9.148.8.128]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 7 Nov 2019 08:39:04 +0000 (GMT) Date: Thu, 7 Nov 2019 10:39:03 +0200 From: Mike Rapoport 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 Subject: Re: [PATCH 1/1] userfaultfd: require CAP_SYS_PTRACE for UFFD_FEATURE_EVENT_FORK 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 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 19110708-0008-0000-0000-0000032C54E9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19110708-0009-0000-0000-00004A4B58F4 Message-Id: <20191107083902.GB3247@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-11-07_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=954 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1910280000 definitions=main-1911070084 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.