Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp677588pxk; Wed, 16 Sep 2020 14:11:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa2rAZiuBdI6nR0SnMfv18T0zPHLT+Iiv30MjPMP2SSrVz0swZEhlCu16DfKtMmfCg+/d9 X-Received: by 2002:a17:906:4956:: with SMTP id f22mr26070674ejt.62.1600290680022; Wed, 16 Sep 2020 14:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600290680; cv=none; d=google.com; s=arc-20160816; b=mgB+aF4R1gh2LbmyS/nth9T75O4xymI757wY+2w+xYK5dccJg87gULUehlJCx7TXU1 2iT3WxwrgXJ7Yuh9eC5WK7Us729DDWHv2Hoex+nKgiSbnJIMSWxF+W68QPmEw48sZ4Sb VsItC4BGHOIYrc3YUPfvnN1moBotPehFby9OOShUcYIuKYB8QJYxz+A7bfDFv3/j4WKj aVUq6m5cMXAU8sAUNnWDAlG9cfGvgNGHO7PrnFXRPLcCqjR8U5/lMoCtQQMQujpGaG4Q ksLbVJkywwcUKiYlLIxA4/rcuv7LW5MAECmPpMpqOSv9oe/nQnGv2VvOHD9tzPynfpbC RvFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=2L8WeVvRo1osqjjhclSBTpn136Oyr6chq2WMPl65EcM=; b=0F2Zw5Vu89ZeqBY70JBJWjYbusFSsdk7gmU78ckzOYZytJSwDvIhprnIHafaSzjKu6 fP1uxrHB9jOdYcqAzSvs5yrn/45nsELPkRjn8SxljlKA1K1kH50VymIkEwbEezLL1ElM 8Dfik1hGFWJWIKxis0/r/Air3nvICOnF4rfvjTAXZhaSGNP/QsfiP6J0J5s2pZDWD5kO IaTQCrVq57YLXgwf5cJ15A/Y+eJ7vZ201Y7BLd6GVyXa5NrJtdtoHejMxUDS7MN8xDPA yzkvBHdwJKEstqP/bvQ62BoYzuxP8ymkJYrHPLvGDluAkDnOtzKh2289yNfwalqXyYx1 K+AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=sha7upVR; 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 v9si13377493edd.297.2020.09.16.14.10.55; Wed, 16 Sep 2020 14:11:20 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=sha7upVR; 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 S1726335AbgIPVHe (ORCPT + 99 others); Wed, 16 Sep 2020 17:07:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726183AbgIPQDm (ORCPT ); Wed, 16 Sep 2020 12:03:42 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06A26C02C295; Wed, 16 Sep 2020 08:59:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=2L8WeVvRo1osqjjhclSBTpn136Oyr6chq2WMPl65EcM=; b=sha7upVR0ozVlTJFDWdFS4KUrg Dlh504xPkCjJ6bcnR0tgQmZYiIutQK/G0ONBD+iomCp+zVQ82oPYqYPfOa29q6UCwl36D+BB9FNFs pSeTBdPEiVQz6llxOwpNLZRraxMD45Yt9agHPf8ceWEhufE5EkURg5LtEm+1DjoRnfjJ/WOFs5+4j BadKgeBe/qwlbda6A6xYg/rSWFAOIGOJ/+qKGuMxZNBtCJ1ZUglDN7/DVuOWKZv/bNRIhqme65n0j CV7jlQDHwCcs1yfZz07j2hPdh6zbICLmsA3R4X5f+JNoZnWPrhrt60ytieQyxK1LeEjJ519udtgbv hAy+S0yQ==; Received: from [2601:1c0:6280:3f0::19c2] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIZqU-0000qm-87; Wed, 16 Sep 2020 15:59:46 +0000 Subject: Re: [PATCH v5 3/5] mm: introduce memfd_secret system call to create "secret" memory areas To: Mike Rapoport , Andrew Morton 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 , 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-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org References: <20200916073539.3552-1-rppt@kernel.org> <20200916073539.3552-4-rppt@kernel.org> From: Randy Dunlap Message-ID: <6319035d-73db-4b4d-3fa7-aaa11d3843a0@infradead.org> Date: Wed, 16 Sep 2020 08:59:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200916073539.3552-4-rppt@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mike, On 9/16/20 12:35 AM, Mike Rapoport wrote: > From: Mike Rapoport > > > Signed-off-by: Mike Rapoport > --- > arch/Kconfig | 7 + > arch/x86/Kconfig | 1 + > include/uapi/linux/magic.h | 1 + > include/uapi/linux/secretmem.h | 8 + > kernel/sys_ni.c | 2 + > mm/Kconfig | 4 + > mm/Makefile | 1 + > mm/secretmem.c | 264 +++++++++++++++++++++++++++++++++ > 8 files changed, 288 insertions(+) > create mode 100644 include/uapi/linux/secretmem.h > create mode 100644 mm/secretmem.c > > diff --git a/arch/Kconfig b/arch/Kconfig > index af14a567b493..8d161bd4142d 100644 > --- a/arch/Kconfig > +++ b/arch/Kconfig > @@ -975,6 +975,13 @@ config HAVE_SPARSE_SYSCALL_NR > config ARCH_HAS_VDSO_DATA > bool > > +config HAVE_SECRETMEM_UNCACHED > + bool > + help > + An architecture can select this if its semantics of non-cached > + mappings can be used to prevent speculative loads and it is > + useful for secret protection. Please use tabs instead of spaces for indentation. > + > source "kernel/gcov/Kconfig" > > source "scripts/gcc-plugins/Kconfig" > diff --git a/mm/Kconfig b/mm/Kconfig > index 6c974888f86f..70cfc20d7caa 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -868,4 +868,8 @@ config ARCH_HAS_HUGEPD > config MAPPING_DIRTY_HELPERS > bool > > +config SECRETMEM > + def_bool ARCH_HAS_SET_DIRECT_MAP && !EMBEDDED Use tab above for indentation. > + select GENERIC_ALLOCATOR > + > endmenu thanks. -- ~Randy