Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp896332ybi; Fri, 14 Jun 2019 05:17:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXeF3kFUX2iJEYXlzNGRu3/4hfW2oc96fCWGuVYTO8gRRYC+2CQmYUZNk2eqLzlD+7UOIV X-Received: by 2002:a17:90a:7f02:: with SMTP id k2mr10887637pjl.78.1560514628884; Fri, 14 Jun 2019 05:17:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560514628; cv=none; d=google.com; s=arc-20160816; b=GPb10aNj8DgSo/76qY/ihSBxgc6ac/hpVxpLwXeaCzQIhg4B9JIdoNk2PW1ZWjJNL+ PhkXvzsyCpHiy6FW1JYrndRTqnu7aLo4i1oRjqXKwzRQFakcHBRnwKgZ33jpbf4dgYPf yo33Zpxd0RV6VoGaUoaqdzax/LJf+FQgiixLMo4QiJBWSftAYzfJU09Gqt38oZSPzz5m 8NO9vdr59JcDCOz9zm/jzQw0Pf7PpmIWkT/+aw9aomxTnAZVltvCAOWFGjzRiA2BSmTc nteMzAZgy+7uqpKfqsGlzOt4EoFjIchaXUwpWsZvPnhfW4karg2Xlf2oefW33zKyU/Ua 3Juw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4508jy29+aun7N2LGIzBHEHdPpOHU7DfASwN5eoEnJ0=; b=kdhh6MXBrLBDoBvYkcPN7LXujOLtsYajwxafDm3KQz3AuVYSmYSWxa5jPe5tRQlufQ 3+cSgBAsAPUJwS49DpOZQ/RZJa+Jvp0K9XBk78AHd0m9FJAAFWrvv6XvHSI1xxHGwSxg x8A3qA2OpO+Ug7jJ6WkudNNEbRrO5Nxqj23+gEHKT3WEsd+WtAUJ4J9mLTXEw1LvD9kw 0IYqEocxgWvdMneRD3hCmxLf0bju7ivLvO1kihizrT0+LhPa5Byy0vFC7k+pKNeznKdX kBXQ3rDDHx7hnA+C6OVJm1TfCJssa4H4aSke3p0IfW75VO4/7h6DO4AYbqzxoJU3yXjB 21QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=znSzzWUD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si2257879pld.78.2019.06.14.05.16.52; Fri, 14 Jun 2019 05:17:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=znSzzWUD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727688AbfFNMPb (ORCPT + 99 others); Fri, 14 Jun 2019 08:15:31 -0400 Received: from merlin.infradead.org ([205.233.59.134]:38208 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727544AbfFNMPb (ORCPT ); Fri, 14 Jun 2019 08:15:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=4508jy29+aun7N2LGIzBHEHdPpOHU7DfASwN5eoEnJ0=; b=znSzzWUDWHtxTeSgjW/Fm4G9b I0fEYjCe6xbhDAdqQtncGNa7JPgPEedhGzQZEmkIJUL0jsptzXyvy/BM7k+T2GipSP5waiKTIz4cp FdK4P3MeaT9AODHnmT90Abzm+kAOhgPUSMxh5fFPrRDGUtSAlguTcAc6N/onnUBjsQCcgNm27oU7M oJC+jqsSKBHSg4/lQ5lvGNvKBDQa+ZYvQ2XYniMOnwc9/JiksBCPrd1dx0Z+MLEIcRMVIuGtFOSRI rSu0GIJ8PDZaiYJzZD9mXB6ZSPNeTG+fp/ksjm6PY/z69c2wRCwth07eu0Ff4g0l/rE9yCGsMPSuE GcTXZV0aQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hbl6z-0007bG-Ai; Fri, 14 Jun 2019 12:15:17 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0A24120A29B57; Fri, 14 Jun 2019 14:15:15 +0200 (CEST) Date: Fri, 14 Jun 2019 14:15:14 +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 00/62] Intel MKTME enabling Message-ID: <20190614121514.GK3436@hirez.programming.kicks-ass.net> References: <20190508144422.13171-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190508144422.13171-1-kirill.shutemov@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 08, 2019 at 05:43:20PM +0300, Kirill A. Shutemov wrote: > = Intro = > > The patchset brings enabling of Intel Multi-Key Total Memory Encryption. > It consists of changes into multiple subsystems: > > * Core MM: infrastructure for allocation pages, dealing with encrypted VMAs > and providing API setup encrypted mappings. That wasn't eye-bleeding bad. With exception of the refcounting; that looks like something that can easily go funny without people noticing. > * arch/x86: feature enumeration, program keys into hardware, setup > page table entries for encrypted pages and more. That seemed incomplete (pageattr seems to be a giant hole). > * Key management service: setup and management of encryption keys. > * DMA/IOMMU: dealing with encrypted memory on IO side. Just minor nits, someone else would have to look at this. > * KVM: interaction with virtualization side. You really want to limit the damage random modules can do. They have no business writing to the mktme variables. > * Documentation: description of APIs and usage examples. Didn't bother with those; if the Changelogs are inadequate to make sense of the patches documentation isn't the right place to fix things. > The patchset is huge. This submission aims to give view to the full picture and > get feedback on the overall design. The patchset will be split into more > digestible pieces later. > > Please review. Any feedback is welcome. I still can't tell if this is worth the complexity :-/ Yes, there's a lot of words, but it doesn't mean anything to me, that is, nothing here makes me want to build my kernel with this 'feature' enabled.