Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1274831pxa; Thu, 6 Aug 2020 04:05:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyL4ZMs1Fw1WvMUMmiPS7HnPH+WMUQDwdw4ig4Qk8NJ84YAdU5J8wPzEb9jDe6TgkHrTnJV X-Received: by 2002:a17:906:c259:: with SMTP id bl25mr3679908ejb.303.1596711938979; Thu, 06 Aug 2020 04:05:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596711938; cv=none; d=google.com; s=arc-20160816; b=za0G2Trs3vIfrpOWBZIjF81/2ua7KPCYC8++aV3CMKr/hulDV/AbsBXppkeNCOhs+5 Ketc5WywioS0GJAjKXuW+7ViWrkUQh8110KyBeguWq/HLrK2WL4ZNloGHUj9bCCzCtjA JP8ZsT5MNB54bLCMDzdAjxpd6WAyYuxQ26KIsp/0eqY/+MU0y2Ye3RbqlQ+iOOVXF75G C7MKkGxz6cCByWq123arIa0Jy2QkWvXP7ONf6+bLKFRhikSZlHfc3BJVxrM46jbjqWI+ UKttR8Fn5Xt1KHrNZwBj7lT+8iANiHP+Eaw8Y82uimTxAfYtaeG7hdg+BX6kuvVaww+b Fx/g== 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 :dkim-signature; bh=kMBgMZhsaHkiYpNXe6mnulxBmErGl6mZVT718X/hP1s=; b=Y75a6hPB2Q3hBvBAeeHRARZk4xOSecKTVRqimEBsRrzETA34ILEnH8lI31h+B+b2HY qOs/mwgGJFaW4bs2I+Xl7R2OVMpMZHmEzeFd+0We8tF9UcyMaUr/asuThPwZxsFDpn8j 7RIg/2JGI+2r+9hJOBH3mx0BS23FRvhbApDy+SkxcEPdeATgovphKYwOjmOa44RUouIm Gi4ORdmWET0gHluqAd2gIGqq9zBdZ7PHvmE6XoJCWRHOVmhbf4Zd6GqqnQ7Tf62EmVSx UakqJ9N2i/omtpK3X7eUJ9XEKjQUyE58u6+JP6Zdk9XBI62+fQY9Q542MzWst4fbpEJC SglA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="q44JM/Mh"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g22si1913292ejx.196.2020.08.06.04.05.14; Thu, 06 Aug 2020 04:05:38 -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; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="q44JM/Mh"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726149AbgHFLEh (ORCPT + 99 others); Thu, 6 Aug 2020 07:04:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729279AbgHFKgX (ORCPT ); Thu, 6 Aug 2020 06:36:23 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB9E1C0617A1 for ; Thu, 6 Aug 2020 03:27:51 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id g6so38507630ljn.11 for ; Thu, 06 Aug 2020 03:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kMBgMZhsaHkiYpNXe6mnulxBmErGl6mZVT718X/hP1s=; b=q44JM/MhPtGS1X8CEtdPT8jY1IsznRmL/EUJCRVKZ0SQjpJuKmiF3MRSg0V201k6/0 7wdleRwGXgcpS6GBcJQn3aN4+K1pHDGZuvFRDvTF9APAIhXb+a2xl9Jp+eur4UHwQKOG a+RLO7aCLHiHjNUkqDHv3KHpAByqNpYKygFYVYfjG2rDRNZ1boVJjHid9G6QxHXMRDHj lxu6G5SWy3EMKBtlkZJxRZeLycn9DXYVVNUnw64xSNl8FhKmMBKmB/5GaDUrg6bknGVy 69EcKcUZE3qqrUPWzoTffaHacemMJWCOZb/G6QEBjYa8rAKMuVSkNGFwC876gdtvvS/j Xp6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kMBgMZhsaHkiYpNXe6mnulxBmErGl6mZVT718X/hP1s=; b=HcKeeIat/rByzKASXGjtRf52YxAJK6HBjzBVRS1pVlBU8UA4zVdCI5kjUJNLyHPewG s5BEqk75OJjRtLYi02/2bFm1JEYLgsyk3nFHQ369dh1nK67ky8DhddLZ9U3o1WzMGmIt j/BgEHRKUfosjfstYfszFqjEMxTCKqemdeSbQZJBZL/Hk3mMj0cDPx24dAnwuSfP+KFb 0NjIJyIyR11SEV3wGTrnlhjxEdl9hkKhyuqtz3EiD6DwMCbM/rtZ699goH/jViDtQ9YK +w1tjwFzjyI7AwTzH3YuQhgZX4Zag5zxRzjJdq0HemenkyrVZYmJ/W9070KmARsG00sl EHVg== X-Gm-Message-State: AOAM533lYHnV6mCRKeCMDVwrrdoVaQp2k2AnBBgznB1GkyyhL4sT3eKF 0tpH50ov/kWs4BO8hLiXuVxfCQ== X-Received: by 2002:a05:651c:201b:: with SMTP id s27mr3653296ljo.468.1596709669841; Thu, 06 Aug 2020 03:27:49 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id h18sm2208204ljk.7.2020.08.06.03.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2020 03:27:49 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 80A47102E1B; Thu, 6 Aug 2020 13:27:57 +0300 (+03) Date: Thu, 6 Aug 2020 13:27:57 +0300 From: "Kirill A. Shutemov" To: Mike Rapoport Cc: 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 , Mike Rapoport , 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: <20200806102757.7vobcaewdukr2xdl@box> References: <20200804095035.18778-1-rppt@kernel.org> <20200804095035.18778-4-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200804095035.18778-4-rppt@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. What am I missing? -- Kirill A. Shutemov