Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1338381pxa; Thu, 6 Aug 2020 05:37:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwp1HH6NiX/rzHk+0Ick1twZTsMmzNVnFIWpJfr4fl6pClRss/exBh9HqzuGZw+HSUWLQHF X-Received: by 2002:a17:906:819:: with SMTP id e25mr4333980ejd.95.1596717428110; Thu, 06 Aug 2020 05:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596717428; cv=none; d=google.com; s=arc-20160816; b=tNxbkCL70wkUlZd7VYmIjlTPRGn6HTc9s/QJ6b5oPuWwYfzcOa2ZgLM5Agvc50J/pq kIWDF5OUyNLIlD2pM15ixklFFE14MuiqCLBOVOROUmOhfNyyi3BnNo6K14iYnEvwz1lu zuKULVCuvFlRUYjglLvO7ZbTK2yP86zbJa1k/UP/kVouaC9X5Kpb966+cEXbwHcK98Qe iHFlsEYOqC9D5JSxcdKyK2DXryAWqdnPrfX+9JVpV9xQQ2ZfxmVQllvzF+fJ8e7KlVx1 tMRTdfnx/VehxKLw3qE0vnv0fD1cokrg2Pu4P9unWYbXg3Av23runFBznJCATr3n0EUL m0cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=H+nlJactdrpGlPlxnoZOQ1oX3JlktoZ4wyP/A8qhbsU=; b=ae7jxn+s8mztMuAyQlZAi/74PaaVlwXOehnxP2X8TRUwkZQMrAh0PPnGn4BxkpQpKx 1S1mPBWnUdM8m7W2ruEswVuJRy86Jx8SW6sFY+35O0d6WseOeZKUzq4eSNI2TBi0LJCA SKt3bq4yeIqFmYdYFSuuJC0fR+YPXGOQgUr4bRSkoxJYyHcFb3fqyRGYciGclUu1ictl UrGI/aJFrD3bi26bwf9ROHAEOaBO0+Had78HrvYH/Zs93XgGqPf2HxUUwixMkr2NUi+u biKFxzN0XGyvNsPn127kK3VignsI8AdRMWLq7ApHV6AbdK+b2zBxcOhfclqVs6Uvl7vd nzOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id h22si3197311ejj.363.2020.08.06.05.36.32; Thu, 06 Aug 2020 05:37:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726375AbgHFMSu (ORCPT + 99 others); Thu, 6 Aug 2020 08:18:50 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:32230 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726970AbgHFLPk (ORCPT ); Thu, 6 Aug 2020 07:15:40 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 076B5Irv003910; Thu, 6 Aug 2020 07:14:27 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 32ra0rjm1p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Aug 2020 07:14:26 -0400 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 076B5tLh007950; Thu, 6 Aug 2020 07:14:26 -0400 Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com with ESMTP id 32ra0rjm0j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Aug 2020 07:14:25 -0400 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 076B6ULk029608; Thu, 6 Aug 2020 11:14:23 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06fra.de.ibm.com with ESMTP id 32mynhba4f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Aug 2020 11:14:22 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 076BEKJH58065174 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 6 Aug 2020 11:14:20 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B613BAE051; Thu, 6 Aug 2020 11:14:20 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6127CAE055; Thu, 6 Aug 2020 11:14:17 +0000 (GMT) Received: from linux.ibm.com (unknown [9.145.24.39]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 6 Aug 2020 11:14:17 +0000 (GMT) Date: Thu, 6 Aug 2020 14:14:15 +0300 From: Mike Rapoport To: "Kirill A. Shutemov" Cc: Mike Rapoport , linux-kernel@vger.kernel.org, Alexander Viro , Andrew Morton , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dan Williams , Dave Hansen , Elena Reshetova , "H. Peter Anvin" , Idan Yaniv , Ingo Molnar , James Bottomley , Matthew Wilcox , Mark Rutland , Michael Kerrisk , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Thomas Gleixner , Tycho Andersen , Will Deacon , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org Subject: Re: [PATCH v3 3/6] mm: introduce memfd_secret system call to create "secret" memory areas Message-ID: <20200806111415.GL163101@linux.ibm.com> References: <20200804095035.18778-1-rppt@kernel.org> <20200804095035.18778-4-rppt@kernel.org> <20200806102757.7vobcaewdukr2xdl@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200806102757.7vobcaewdukr2xdl@box> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-06_06:2020-08-06,2020-08-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 mlxlogscore=923 lowpriorityscore=0 suspectscore=1 bulkscore=0 clxscore=1015 spamscore=0 priorityscore=1501 impostorscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008060079 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 06, 2020 at 01:27:57PM +0300, Kirill A. Shutemov wrote: > On Tue, Aug 04, 2020 at 12:50:32PM +0300, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Introduce "memfd_secret" system call with the ability to create memory > > areas visible only in the context of the owning process and not mapped not > > only to other processes but in the kernel page tables as well. > > > > The user will create a file descriptor using the memfd_secret() system call > > where flags supplied as a parameter to this system call will define the > > desired protection mode for the memory associated with that file > > descriptor. Currently there are two protection modes: > > > > * exclusive - the memory area is unmapped from the kernel direct map and it > > is present only in the page tables of the owning mm. > > * uncached - the memory area is present only in the page tables of the > > owning mm and it is mapped there as uncached. > > I'm not sure why flag for exclusive mode is needed. It has to be default. > And if you want uncached on top of that set the flag. Makes sense. > What am I missing? > > -- > Kirill A. Shutemov -- Sincerely yours, Mike.