Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3407097ybt; Tue, 30 Jun 2020 01:51:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/xxSDfR5BeK39tzOlNSVzdHtpasI5LxygGnmnxFIYib9BzA/ZdL5SGWxYdDctal5Mfdz0 X-Received: by 2002:a50:d1c2:: with SMTP id i2mr21309510edg.42.1593507077606; Tue, 30 Jun 2020 01:51:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593507077; cv=none; d=google.com; s=arc-20160816; b=iYpOYVX6QAuAQgM73Vzv157fnwK99BQBCsauKvWj6LVF3b8tDQ6eSIMOe4tz5tgenJ tZz8YHXSX0qLTXOPPq9wAl5bXiDkzBjn+1rDvbsZqCXzqH5uYsvVzVQJSr/pD0ncNnDp 8hCbKyGKil93fs5u6cfj3iwedAeyGntro0cnWxZvQoGMiUuqyvKNSZfSEHogLjnizt0N VKdbCuR+pbZ1aQV31MpDpCIv2bDatRlT+EPzkRwOgNMiR2rN69NniCb5N7Jt+pwkF2nN mD930euz/Bs4ptI97y3L15A5HL3IVaHkCA9r/gROLctSoKv9AcTiL4rXvL5ABlPb4QHN 4Gyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=oRm5RCCRuDGEyj0/k3JMpu55Vd9Mg+DkgrloRPSHKKU=; b=AXNdmLJc8fhJ9KWgm8Ny7gyxLY5mEnwDUUuWEgK5XiqjRd96bxN7kXp0XdmmDlgGyd SO1As3O+jneqFItKKMwfLEvAR/gLoluMnhREZDwANi7p3eNFhpyb9zkvdLGpbxwFb1+e XplpySWDFGq3EaimmPWzAT8O56ih1oM4YEP0Wuq5xa2dXk68xMIAXkw73ZdTLb4rhPEN sdxXkduA3K5pWnqSV7YzNvk+qsM2fu50dios0hkWKQzUnY4/rAkqRWuyMTjtNHE2Dg72 DTQf3F6W2Z4KK/6g6GMgQPiuOLTzPezhRpWKrsNywIha0sUVjkGRfEy9ngetPP8lZxrB IvfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=bShX4bZP; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si1379902ejb.186.2020.06.30.01.50.54; Tue, 30 Jun 2020 01:51:17 -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=pass header.i=@alien8.de header.s=dkim header.b=bShX4bZP; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731749AbgF3IuB (ORCPT + 99 others); Tue, 30 Jun 2020 04:50:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731697AbgF3It6 (ORCPT ); Tue, 30 Jun 2020 04:49:58 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63C2FC061755; Tue, 30 Jun 2020 01:49:58 -0700 (PDT) Received: from zn.tnic (p200300ec2f0eff00c5d3fc2efff9f4b6.dip0.t-ipconnect.de [IPv6:2003:ec:2f0e:ff00:c5d3:fc2e:fff9:f4b6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E29EB1EC031B; Tue, 30 Jun 2020 10:49:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1593506997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=oRm5RCCRuDGEyj0/k3JMpu55Vd9Mg+DkgrloRPSHKKU=; b=bShX4bZPlos7EtZLnpbbtTAkxmhr3YrU3PnjxMTqUOxbp3itPr5gLZYhn1dfEppciaUVRt ++TME2mCXjoMni8syGG0MYTWKTIi1L8eHYWdkU7cpQ/9LRvaTJc4v7OBhZS2gDG4wqq39o dzz0/sVJPqnNkz8mZS6fMEKso7xmF2A= Date: Tue, 30 Jun 2020 10:49:56 +0200 From: Borislav Petkov To: Sean Christopherson Cc: Jarkko Sakkinen , x86@kernel.org, linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Jethro Beekman , Andy Lutomirski , akpm@linux-foundation.org, andriy.shevchenko@linux.intel.com, asapek@google.com, cedric.xing@intel.com, chenalexchen@google.com, conradparker@google.com, cyhanish@google.com, dave.hansen@intel.com, haitao.huang@intel.com, josh@joshtriplett.org, kai.huang@intel.com, kai.svahn@intel.com, kmoy@google.com, ludloff@google.com, nhorman@redhat.com, npmccallum@redhat.com, puiterwijk@redhat.com, rientjes@google.com, tglx@linutronix.de, yaozhangx@google.com Subject: Re: [PATCH v33 12/21] x86/sgx: Allow a limited use of ATTRIBUTE.PROVISIONKEY for attestation Message-ID: <20200630084956.GB1093@zn.tnic> References: <20200617220844.57423-1-jarkko.sakkinen@linux.intel.com> <20200617220844.57423-13-jarkko.sakkinen@linux.intel.com> <20200629160242.GB32176@zn.tnic> <20200629220400.GI12312@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200629220400.GI12312@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 29, 2020 at 03:04:00PM -0700, Sean Christopherson wrote: > > I don't see this acronym resolved anywhere in the whole patchset. > > Quoting Enclave. Yah, pls add it somewhere. > /dev/sgx/provision is root-only by default, the expectation is that the admin > will configure the system to grant only specific enclaves access to the > PROVISION_KEY. Uuh, I don't like "the expectation is" - the reality happens to turn differently, more often than not. > In this series, access is fairly binary, i.e. there's no additional kernel > infrastructure to help userspace make per-enclave decisions. There have been > more than a few proposals on how to extend the kernel to help provide better > granularity, e.g. LSM hooks, but it was generally agreed to punt that stuff > to post-upstreaming to keep things "simple" once we went far enough down > various paths to ensure we weren't painting ourselves into a corner. So this all sounds to me like we should not upstream /dev/sgx/provision now but delay it until the infrastructure for that has been made more concrete. We can always add it then. Changing it after the fact - if we have to and for whatever reason - would be a lot harder for a user-visible interface which someone has started using already. So I'd leave that out from the initial patchset. > If you want super gory details, Intel's whitepaper on attestation in cloud > environments is a good starting point[*], but I don't recommended doing much > more than skimming unless you really like attestation stuff or are > masochistic, which IMO amount to the same thing :-) No thanks. :) -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette