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=-5.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 E1834C31E44 for ; Fri, 14 Jun 2019 11:55:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AF63F2133D for ; Fri, 14 Jun 2019 11:55:38 +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="SxtEFaoe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727656AbfFNLze (ORCPT ); Fri, 14 Jun 2019 07:55:34 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:33656 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727217AbfFNLze (ORCPT ); Fri, 14 Jun 2019 07:55:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2Scd2Bpf0fSHqxbPEw6UkC56OpyXzshQKSbLT1BGTuQ=; b=SxtEFaoeA/gGdI45bl5WDh0rm I8rqVc2P6Ire31B/frJwfn3BZevD8+rTnnPsW81DmL1vcwL3Oroa/WTa+06mMLBfAOMXsESaJhjN9 a9NGVOQTEB6X4Aegoqbb+TFZ99HagBthuhA9vzvY3S3/iNX7uvOOd7X/pg1x/2Dxmzp8e8uTgxpL9 81ZTEgZxdLhnxb1L/1gBwZxfkS1ckTGyswxvZA/SieYXCt8MGN1t7v6waleq9Im39RATa/Tn5UiUr bFkXoa/Xp8tXJFJ6bva0NaMeh+vFMplN6lhH4kyKzdO9MMzyrWkt7X+2fLBI74i70KerNv8GQjFws GHtEJZjzA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hbknh-0003ZT-QN; Fri, 14 Jun 2019 11:55:21 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5BB0620A15636; Fri, 14 Jun 2019 13:55:20 +0200 (CEST) Date: Fri, 14 Jun 2019 13:55:20 +0200 From: Peter Zijlstra To: "Kirill A. Shutemov" Cc: Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Andy Lutomirski , David Howells , Kees Cook , Dave Hansen , Kai Huang , Jacob Pan , Alison Schofield , linux-mm@kvack.org, kvm@vger.kernel.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH, RFC 47/62] mm: Restrict MKTME memory encryption to anonymous VMAs Message-ID: <20190614115520.GH3436@hirez.programming.kicks-ass.net> References: <20190508144422.13171-1-kirill.shutemov@linux.intel.com> <20190508144422.13171-48-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190508144422.13171-48-kirill.shutemov@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, May 08, 2019 at 05:44:07PM +0300, Kirill A. Shutemov wrote: > From: Alison Schofield > > Memory encryption is only supported for mappings that are ANONYMOUS. > Test the VMA's in an encrypt_mprotect() request to make sure they all > meet that requirement before encrypting any. > > The encrypt_mprotect syscall will return -EINVAL and will not encrypt > any VMA's if this check fails. > > Signed-off-by: Alison Schofield > Signed-off-by: Kirill A. Shutemov This should be folded back into the initial implemention, methinks.