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=-11.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 43498C43461 for ; Wed, 16 Sep 2020 21:06:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E3F0820731 for ; Wed, 16 Sep 2020 21:06:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="sha7upVR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726582AbgIPVF7 (ORCPT ); Wed, 16 Sep 2020 17:05:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726444AbgIPQOy (ORCPT ); Wed, 16 Sep 2020 12:14:54 -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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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