From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5FF9CA9EA0 for ; Fri, 25 Oct 2019 20:12:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FDCD21872 for ; Fri, 25 Oct 2019 20:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728017AbfJYUM4 (ORCPT ); Fri, 25 Oct 2019 16:12:56 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:63836 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726472AbfJYUMz (ORCPT ); Fri, 25 Oct 2019 16:12:55 -0400 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9PKC1tl009126 for ; Fri, 25 Oct 2019 16:12:54 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vusu9gtvs-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 25 Oct 2019 16:12:54 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 25 Oct 2019 21:12:52 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 25 Oct 2019 21:12:47 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9PKCkce60948514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Oct 2019 20:12:46 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A351B5204F; Fri, 25 Oct 2019 20:12:46 +0000 (GMT) Received: from linux.ibm.com (unknown [9.148.205.37]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 54F7C5204E; Fri, 25 Oct 2019 20:12:45 +0000 (GMT) Date: Fri, 25 Oct 2019 23:12:43 +0300 From: Mike Rapoport To: Andrea Arcangeli Cc: Andy Lutomirski , Jann Horn , Daniel Colascione , Linus Torvalds , Pavel Emelyanov , Lokesh Gidra , Nick Kralevich , Nosh Minwalla , Tim Murray , Mike Rapoport , Linux API , LKML Subject: Re: [PATCH 3/7] Add a UFFD_SECURE flag to the userfaultfd API. References: <20191012191602.45649-1-dancol@google.com> <20191012191602.45649-4-dancol@google.com> <20191023190959.GA9902@redhat.com> <20191024090258.GA9802@linux.ibm.com> <20191024151054.GJ9902@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191024151054.GJ9902@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 19102520-0016-0000-0000-000002BDA4DB X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19102520-0017-0000-0000-0000331EF01D Message-Id: <20191025201242.GA8710@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-25_10:,, 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=747 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910250184 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Oct 24, 2019 at 11:10:54AM -0400, Andrea Arcangeli wrote: > Hello, > > On Thu, Oct 24, 2019 at 12:02:59PM +0300, Mike Rapoport wrote: > > That's no the reason that UFFD_FEATURE_EVENT_FORK does not show up in > > Debian code search, CRIU simply is not there. Debian packages CRIU only in > > experimental and I believe that's not indexed by the code search. > > > > As for the limitations, the races were fixed, I just forgot to update the > > wiki. As for the supported memory types and COW pages, these only affect > > efficiency of post-copy, but not the correctness. > > That's what I was hoping for. If the wiki information is stale and > there are no races it is totally plausible that it's being actively > used in production so we need to fix the kernel bug. I was just > checking because I wasn't sure anymore of the status after I read the > wiki. > > If the CRIU initialization code that issues the uffd syscall runs as > global root the ABI breaking permission check from Andy sounds the > simplest for a short term fix, because it will be unnoticed by any > production usage with CIRU --lazy-pages. In general, criu can run as non-root, but such use of criu has limitations, so allowing criu --lazy-pages only for root sounds reasonable as a short term solution. > Then later we could add a UFFD_FEATURE_EVENT_FORK2 that will not > require root permission. Agree. > Thanks, > Andrea > -- Sincerely yours, Mike.