Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5831810pxb; Tue, 16 Feb 2021 08:37:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwtBIvkAf9byfr9foimwYoWF59DwX+++TbypBBqNA7fVpehuoKh5d6Uh+7OV6WODi4pY6PB X-Received: by 2002:a17:907:2d10:: with SMTP id gs16mr21400697ejc.0.1613493458379; Tue, 16 Feb 2021 08:37:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613493458; cv=none; d=google.com; s=arc-20160816; b=nWr7pTlyxOFoa/QfozOqmzEoNi57Gucq5cy3w5Vn/XzQUVwshIFDO+ywMKGj51ILGo NKSTU3G1GNi1hn5/o4zIEUUgb7vdJOz0weHxasGsJQt9CaZN9PRmoKVgNug30vgk09mn AguYERRigW8E5NHcYQZ7n9NwUpkCDf0E/8vnbzssVI+6VgtC6egJ5npzVMsGu3WokDqe jFeFs/bSxx6ACq0wvcSestYSp1CoPMUnhEdXiCm+eCseTQZd8Yt+a15oS9kthLfHsMYM SwLT8TNX7S3+V7ZsTJii7nkyQMn2F/JukPjUbNW1cSlD2YDcbIUsVJaTK+GkQr4FRdZl 9mag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=KysYIYMpQ7qMwmL/JUOCOKvLfXo3jE4QCyxH618MYzE=; b=ij4YmuBGhXdntN3a+OIkGI5sMD+wiLaSAHYzbJjiaEaBi2rkum1SN0MFuPm28bw5T3 HK4z8xWl7m2Vca0SrkXhFhsp1C0djDB6K/fYDEIK1RBWfI33S4oQ95P2RWMpi94UBLYC eB9Gn8V0iOPqefBTQ1kED4WexU8akg1MAFOrf0/OXktlsIVi6RsK27H2+BIyFvZDauR1 bcgct2eaCLYjG4BmsPLzIpVtbUqU0pdYF7iRbc6v7czDzNWZA5MuEDhgLidKIjdsBzFA L5vH7mNmVSh4wpdkeOdNTVlqgdKW+wws8Qk2DxemlBhH+VfrcjyCXPSIc5XSKrr/a64k C9Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YOYDTf7T; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o6si5126394edh.21.2021.02.16.08.37.14; Tue, 16 Feb 2021 08:37:38 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=YOYDTf7T; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229894AbhBPQgE (ORCPT + 99 others); Tue, 16 Feb 2021 11:36:04 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:48320 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229764AbhBPQgD (ORCPT ); Tue, 16 Feb 2021 11:36:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613493275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KysYIYMpQ7qMwmL/JUOCOKvLfXo3jE4QCyxH618MYzE=; b=YOYDTf7Trq50U2iN2ri3ebMVB/pbjAdiqZeHv8At2BKNYOswrJirI8kB1TbesObe/kJwF6 sukwNjy6F1RB/9+0tlMP1KGSx/zseuyNpexWV/eJO+LThf4778H+Ky3IqPklNjMTAR11hm BzKTUuH/MWO2whGJTBQMTTFkLiHUdW4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-12-p1-EOjkyMC-fthVSXfK3rw-1; Tue, 16 Feb 2021 11:34:33 -0500 X-MC-Unique: p1-EOjkyMC-fthVSXfK3rw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8B1051E561; Tue, 16 Feb 2021 16:34:28 +0000 (UTC) Received: from [10.36.114.70] (ovpn-114-70.ams2.redhat.com [10.36.114.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id BF8E31970A; Tue, 16 Feb 2021 16:34:18 +0000 (UTC) Subject: Re: [PATCH v17 07/10] mm: introduce memfd_secret system call to create "secret" memory areas To: jejb@linux.ibm.com, Michal Hocko Cc: Mike Rapoport , Mike Rapoport , Andrew Morton , Alexander Viro , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dan Williams , Dave Hansen , Elena Reshetova , "H. Peter Anvin" , Ingo Molnar , "Kirill A. Shutemov" , Matthew Wilcox , Mark Rutland , Michael Kerrisk , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Rick Edgecombe , Roman Gushchin , Shakeel Butt , Shuah Khan , 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-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org, Hagen Paul Pfeifer , Palmer Dabbelt References: <20210214091954.GM242749@kernel.org> <052DACE9-986B-424C-AF8E-D6A4277DE635@redhat.com> <244f86cba227fa49ca30cd595c4e5538fe2f7c2b.camel@linux.ibm.com> <12c3890b233c8ec8e3967352001a7b72a8e0bfd0.camel@linux.ibm.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Tue, 16 Feb 2021 17:34:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <12c3890b233c8ec8e3967352001a7b72a8e0bfd0.camel@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16.02.21 17:25, James Bottomley wrote: > On Mon, 2021-02-15 at 20:20 +0100, Michal Hocko wrote: > [...] >>>> What kind of flags are we talking about and why would that be a >>>> problem with memfd_create interface? Could you be more specific >>>> please? >>> >>> You mean what were the ioctl flags in the patch series linked >>> above? They were SECRETMEM_EXCLUSIVE and SECRETMEM_UNCACHED in >>> patch 3/5. >> >> OK I see. How many potential modes are we talking about? A few or >> potentially many? > > Well I initially thought there were two (uncached or not) until you > came up with the migratable or non-migratable, which affects the > security properties. But now there's also potential for hardware > backing, like mktme, described by flags as well. I suppose you could > also use RDT to restrict which cache the data goes into: say L1 but not > L2 on to lessen the impact of fully uncached (although the big thrust > of uncached was to blunt hyperthread side channels). So there is > potential for quite a large expansion even though I'd be willing to bet > that a lot of the modes people have thought about turn out not to be > very effective in the field. Thanks for the insight. I remember that even the "uncached" parts was effectively nacked by x86 maintainers (I might be wrong). For the other parts, the question is what we actually want to let user space configure. Being able to specify "Very secure" "maximum secure" "average secure" all doesn't really make sense to me. The discussion regarding migratability only really popped up because this is a user-visible thing and not being able to migrate can be a real problem (fragmentation, ZONE_MOVABLE, ...). -- Thanks, David / dhildenb