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=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 F2E49C388F2 for ; Thu, 6 Aug 2020 11:05:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A803622D03 for ; Thu, 6 Aug 2020 11:05:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="q44JM/Mh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A803622D03 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CBD706B0026; Thu, 6 Aug 2020 06:27:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C45CA6B0027; Thu, 6 Aug 2020 06:27:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B0D978D0003; Thu, 6 Aug 2020 06:27:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0216.hostedemail.com [216.40.44.216]) by kanga.kvack.org (Postfix) with ESMTP id 96C286B0026 for ; Thu, 6 Aug 2020 06:27:52 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 434733621 for ; Thu, 6 Aug 2020 10:27:52 +0000 (UTC) X-FDA: 77119767984.21.spark61_0f009d126fb6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id 0CC0A180442C2 for ; Thu, 6 Aug 2020 10:27:52 +0000 (UTC) X-HE-Tag: spark61_0f009d126fb6 X-Filterd-Recvd-Size: 5298 Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Thu, 6 Aug 2020 10:27:51 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id s16so35920725ljc.8 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=nt7fm8WR4VdLhv1Hd4G0UXiVQ3bVj/zL41APD1KNcyEFfaRcS431utylXtNbXqEGwj VEW+6JCM/5hEd2aBh3wcSHs6i1tyCzcAAIorGiH3coDibhX1A7Wv+ypC8dSbEE9H5sNK cIWDw1KFTASVOTERXjb4BOTrFlZSTBHd+cacMEZDxRMN5zcA5+NM7SodzMoWhLiCAGg1 nzG2a6KUONEPhnLHgYJDn/jWGh03iaOlOiiw6bFsj+5JPm9HbIWf+s1mNfeitUDY0cOc N2CLGg94sz3aJeBO94khaSWJcvgU2NO+I46xiaKE8lSj1A/sXB3wZnuhivljCWXXScM4 8Jpg== X-Gm-Message-State: AOAM533ANfgK/qTz4KZaQnqPE0PC0d0J7ZMaxVIHWPMpMCOWrxFiO+iw j6pyBouPynsl5kx5w2eiROj/5Q== X-Google-Smtp-Source: ABdhPJwKs0kOBphzk4nhXY72GuBZVVKvwfIRMs8kMWmC7io4Zo82tk1RHZ72Ob2Qcz50sTYcK1DvmA== 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> X-Rspamd-Queue-Id: 0CC0A180442C2 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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