Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp779675pxk; Thu, 24 Sep 2020 19:35:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfS7gL3g1v7/ysUl2FhVvQScu0MnC6C9X9OCQDfYdaO9aw7+B5QvKIFwLffFCddB9cMaUs X-Received: by 2002:a17:907:417c:: with SMTP id oe20mr594217ejb.322.1601001355834; Thu, 24 Sep 2020 19:35:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601001355; cv=none; d=google.com; s=arc-20160816; b=x1vkyYg+dSUXkc8DUr1LdSoBCJ4RHIvuf1zYNS81K4ViVskA9eR1uAdjXqJsOhPeeG Hxd+Hvq597nuJYtUYCu/iZtxFQl8Wkg8T1FY933J9bZLEtaymR9gACzM1zyAbM0A8ywj +wYHtmOe/nNcNdybj3ULp4WoiZe2MXc+p1rWVycppw3ybyunLTDRJmJb6O9mnTJppEYU IZWSO6KQnZWyscelJkKjY1xMbKI5jiZJw/pxt8cakjttN91cI3eh2wRSfl8jHK7ow2Q5 zowAWwWHLCuayHtTzwOo5yXBMWI683basYrPWISrQdQ7iaBxcDswo1YOnRe4Z4HXOshY OeKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=2ookyOwvUUzAzLKfZHjd9ImFAQPUUgWc0ZyBJ1iREkg=; b=yynLoY9fOpwLLYt+u00S/zdnEUl63NaFbpvZfulRQvODXnv+YvDpNf9TgTlPqt+K29 Ul6e/tOWpJEqv9pSAyYfNo7cJHAMJRuCVEb95H5a6y36xFDFCZwl56homeBkl/Zqo3GP 2XBOMv0mf5k6fwUfYvqMp1cYzzyjXfNtgAaaZYNNWvAcnxSoEYau/smHF43ijIMVLzI0 3K8IS6OHM8B3h95jIQ22a8DCZjU2HUXEj1PmBLdMdH0aakw0nqzmCBQd+3aoeIVLQ7Oy 8M2VCltSEEb2jkGCTVc/JHjK4J2MDx2H66/KYfo6kO2tLZcwpSVZ3r1lpGvZDg6L+sOS 2z/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=t2Am+bOL; 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 t17si993591ejd.335.2020.09.24.19.35.32; Thu, 24 Sep 2020 19:35:55 -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=@kernel.org header.s=default header.b=t2Am+bOL; 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 S1726874AbgIYCec (ORCPT + 99 others); Thu, 24 Sep 2020 22:34:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:47716 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbgIYCec (ORCPT ); Thu, 24 Sep 2020 22:34:32 -0400 Received: from X1 (unknown [104.245.68.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6CF7620888; Fri, 25 Sep 2020 02:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601001271; bh=Smg4DQZKLT8m1LXboOjRbYbEEA4933QtuIJr9GOx1d4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=t2Am+bOL7aQc+oLElXbYFnp8Y1wlGgthaRTiSGvzkHwzblFnwyTLhHkGuKwh6cPPK dGNyh6ea1G8zhcYz+2jZ/HAlJJzZS2Hb5uMncrKXCFHO9WgB/ShnWeWBcyoD4aVexB fTMs8EfOHnI33GKShzqA790tDOYNu8QPGgMsLH84= Date: Thu, 24 Sep 2020 19:34:28 -0700 From: Andrew Morton To: Mike Rapoport Cc: Alexander Viro , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dan Williams , Dave Hansen , David Hildenbrand , Elena Reshetova , "H. Peter Anvin" , Idan Yaniv , Ingo Molnar , James Bottomley , "Kirill A. Shutemov" , Matthew Wilcox , Mark Rutland , Mike Rapoport , Michael Kerrisk , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Thomas Gleixner , Shuah Khan , 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-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org Subject: Re: [PATCH v6 0/6] mm: introduce memfd_secret system call to create "secret" memory areas Message-Id: <20200924193428.6642e0cc3436bb67ddf8024a@linux-foundation.org> In-Reply-To: <20200924132904.1391-1-rppt@kernel.org> References: <20200924132904.1391-1-rppt@kernel.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 24 Sep 2020 16:28:58 +0300 Mike Rapoport wrote: > From: Mike Rapoport > > Hi, > > This is an implementation of "secret" mappings backed by a file descriptor. > I've dropped the boot time reservation patch for now as it is not strictly > required for the basic usage and can be easily added later either with or > without CMA. > > ... > > The file descriptor backing secret memory mappings is created using a > dedicated memfd_secret system call The desired protection mode for the > memory is configured using flags parameter of the system call. The mmap() > of the file descriptor created with memfd_secret() will create a "secret" > memory mapping. The pages in that mapping will be marked as not present in > the direct map and will have desired protection bits set in the user page > table. For instance, current implementation allows uncached mappings. > > Although normally Linux userspace mappings are protected from other users, > such secret mappings are useful for environments where a hostile tenant is > trying to trick the kernel into giving them access to other tenants > mappings. > > Additionally, the secret mappings may be used as a mean to protect guest > memory in a virtual machine host. > > For demonstration of secret memory usage we've created a userspace library > [1] that does two things: the first is act as a preloader for openssl to I can find no [1]. I'm not a fan of the enumerated footnote thing. Why not inline the url right here so readers don't need to jump around?