Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4799480pxb; Mon, 15 Feb 2021 01:16:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCXNpz2V/amF1uhemuA6ZBM3jxfuXFp2HDwi1eKCJlDKxISdufg6Bm8R6ml4qf1dzWBZKJ X-Received: by 2002:a17:906:16d0:: with SMTP id t16mr14201970ejd.259.1613380584389; Mon, 15 Feb 2021 01:16:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613380584; cv=none; d=google.com; s=arc-20160816; b=glujy6Cj99OzNyo3AFzrP7nGZ2OeeQ0LpYRKnfOJLTfg9uA4aP1CBne4pDMgC9QVXM 0DNSgq2vZaK68MWw5EY/b2VlDM8EAYn30SPyeJ+KeDMAMGtWyFG5zCR++3SKDNCSbv58 nurP9mGYsgAqez27ws+LOlEcGCwEBUB7vAjQKUKjet2cUNonktP/5I1V9ppU9vQCN9S2 FgmJ9Bb0eHKK7kmzfk0jbjNOm5IvzaDY+1nKNvc7vLnUxg2lZI2378wS43nMJXb9ur1X uukcyQk28BdGBxsT5J8GxnS/8cva6o4A/oYbrCLaGOUAb4rFN1Jb+ws0mKHxFPloIHUp sKGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=miCNDkPWZZBRVJ8Jtr1LFzD24yWA9N0KNTV3BkO+MBs=; b=epTQ0VBHixiN17EHG4EnOOVWJnbCYfZ3I/JXnaqbLk9xPCVs0fLl1TDkrd5SCqZkxb hLIDVmPHxn8CjLWMYoXJlnOL6anvM1J0FbQl4GEg3XnM6vxbL8OJFb7Vc2nFemf5ttcX leDpbAU29pkWWjF1T9dkcuq4TwqluQ3s4GHLf141O6MnFH1nHDEuVYPKHLFzuuSHV4yL KX3CIIkLHMkFooi5U8xE3vYGLRUTEiU7FD6dUHL9YK9rBK/zKx9wrKbH2vdiqvt/oyAO Pvwz3NWVrMKgMF3cfZfOxxXKEZ7CJNCfH3dlk7KSvWmBtE/AiT1/2Bf1O9VStczu3Mbw g/aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=TETHPiEq; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cf7si7493190ejb.470.2021.02.15.01.16.01; Mon, 15 Feb 2021 01:16:24 -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=@suse.com header.s=susede1 header.b=TETHPiEq; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230160AbhBOJOl (ORCPT + 99 others); Mon, 15 Feb 2021 04:14:41 -0500 Received: from mx2.suse.de ([195.135.220.15]:33862 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230088AbhBOJOi (ORCPT ); Mon, 15 Feb 2021 04:14:38 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1613380431; h=from:from:reply-to: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=miCNDkPWZZBRVJ8Jtr1LFzD24yWA9N0KNTV3BkO+MBs=; b=TETHPiEq8kl7uQEKm1Aff4L3NsQE0DM02/lfPkpKudaCI6/5lNvCven/uHuRT24qzIXWlb R5BxAqdLhSywOBM2nG5lWN1rFZRScNEvDlYO6zf3OlgEc7VuRTl3HqG4uIymDgc/8zHABu C6iAKZCoFVJI6hxssRHEbP17I8dvFo0= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9278BAD19; Mon, 15 Feb 2021 09:13:51 +0000 (UTC) Date: Mon, 15 Feb 2021 10:13:50 +0100 From: Michal Hocko To: James Bottomley Cc: David Hildenbrand , 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 Subject: Re: [PATCH v17 07/10] mm: introduce memfd_secret system call to create "secret" memory areas Message-ID: References: <20210214091954.GM242749@kernel.org> <052DACE9-986B-424C-AF8E-D6A4277DE635@redhat.com> <244f86cba227fa49ca30cd595c4e5538fe2f7c2b.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <244f86cba227fa49ca30cd595c4e5538fe2f7c2b.camel@linux.ibm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun 14-02-21 11:21:02, James Bottomley wrote: > On Sun, 2021-02-14 at 10:58 +0100, David Hildenbrand wrote: > [...] > > > And here we come to the question "what are the differences that > > > justify a new system call?" and the answer to this is very > > > subjective. And as such we can continue bikeshedding forever. > > > > I think this fits into the existing memfd_create() syscall just fine, > > and I heard no compelling argument why it shouldn‘t. That‘s all I can > > say. > > OK, so let's review history. In the first two incarnations of the > patch, it was an extension of memfd_create(). The specific objection > by Kirill Shutemov was that it doesn't share any code in common with > memfd and so should be a separate system call: > > https://lore.kernel.org/linux-api/20200713105812.dnwtdhsuyj3xbh4f@box/ Thanks for the pointer. But this argument hasn't been challenged at all. It hasn't been brought up that the overlap would be considerable higher by the hugetlb/sealing support. And so far nobody has claimed those combinations as unviable. > The other objection raised offlist is that if we do use memfd_create, > then we have to add all the secret memory flags as an additional ioctl, > whereas they can be specified on open if we do a separate system call. > The container people violently objected to the ioctl because it can't > be properly analysed by seccomp and much preferred the syscall version. > > Since we're dumping the uncached variant, the ioctl problem disappears > but so does the possibility of ever adding it back if we take on the > container peoples' objection. This argues for a separate syscall > because we can add additional features and extend the API with flags > without causing anti-ioctl riots. I am sorry but I do not understand this argument. 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? -- Michal Hocko SUSE Labs