Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1453262ybk; Thu, 14 May 2020 09:20:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx79LFguOf39qN8jkIJPzJ/Kw8WXJedTtU/ocG1w3UUfXkNa05M8eIjX+XDobB6t+wVKWZI X-Received: by 2002:a17:906:b28f:: with SMTP id q15mr4494984ejz.188.1589473204220; Thu, 14 May 2020 09:20:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589473204; cv=none; d=google.com; s=arc-20160816; b=qIKAzKxERjAMkHWHckzTL+BopT74NeWHRzYJL1RY1MwafJ5fyT18+vpcvgWVLxpuUG 0bbFVz/O3FRus9//ql9QWA1p/u+VhQL3iijxfpPME/rHMjDA/5tgM6hVuMoGj1dqbvn/ FaaTmvknrnn1I9ch8vtEId37obmpVOVd2YPAqp1wSVM2V98UG0CF0fcktpmDPzduDJhm 7N9xkCFgPl+8WHLEHOpq8xJy0J5P5Kqt9bR9dt8C2aSr3dIsK4pxobS2x4zRSWTx2l+G kYPGTw28N8hk3BDFi0cGkw6XQsJ0R+YUr0YA4EPkNxVtlObspsPnBjIC7hWyTBBmxXOM ZuWA== 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:ironport-sdr:ironport-sdr; bh=cyw2HLpx4nz3gRzlJ+2zqYbXRjX8yOWi0tVs2c+BrIY=; b=p6SNO4DZ/cnS0BZSlb6FIbNNvYKabZfQ2mBL69dSunIbVHGfHNtpMO2rWgee9HZAJX pr62uTd/tSSk9SVNA3K+pMom37yrWl0Usz0oEj3fsQAwXXYRxnnUcJTNTrJWZCJR4KyU 2N1zXgUGSFO/AzJGegDWk46ksdp+Nw74lJONaloG5wTT+IjGlPv9UDtChjR54sofLgk5 WJQP8Z6LafrdILQxzf4yCYlnumIToWnrycGmMUcWodJDdlopFE7OvzE4F92rX3OGR6Uj ktoe9MAJwV49Sza5Uk3PJZy6znv2X9e8QgZCIw8rVV4K1V9ENB8Gt1uKItE8LiPg6pbn xndw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do16si2570448ejc.265.2020.05.14.09.19.36; Thu, 14 May 2020 09:20:04 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725975AbgENQQB (ORCPT + 99 others); Thu, 14 May 2020 12:16:01 -0400 Received: from mga06.intel.com ([134.134.136.31]:47271 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725926AbgENQQA (ORCPT ); Thu, 14 May 2020 12:16:00 -0400 IronPort-SDR: Rv5SbDg54T7mKaNTGDo55y+40Z8dFHOXPzgM9yE004zB4Fzbh25EBYxYwyUyk9lgNWxmCc9BAQ i22EHzHHsf/g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2020 09:16:00 -0700 IronPort-SDR: VEUTrlChGIZsTXXvAg7bA39pEQpzc9TVeV2C+0RdmxvXui37N5FZYOVkZXxrrKWZMSdjV1lwtP dQVSwDwazCaw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,392,1583222400"; d="scan'208";a="464394342" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.152]) by fmsmga005.fm.intel.com with ESMTP; 14 May 2020 09:15:59 -0700 Date: Thu, 14 May 2020 09:15:59 -0700 From: Sean Christopherson To: "Dr. Greg" Cc: Thomas Gleixner , Jarkko Sakkinen , torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org, akpm@linux-foundation.org, dave.hansen@intel.com, nhorman@redhat.com, npmccallum@redhat.com, haitao.huang@intel.com, andriy.shevchenko@linux.intel.com, kai.svahn@intel.com, bp@alien8.de, josh@joshtriplett.org, luto@kernel.org, kai.huang@intel.com, rientjes@google.com, cedric.xing@intel.com, puiterwijk@redhat.com Subject: Re: [PATCH v29 00/20] Intel SGX foundations Message-ID: <20200514161559.GA15603@linux.intel.com> References: <20200421215316.56503-1-jarkko.sakkinen@linux.intel.com> <20200426165753.GA11046@wind.enjellic.com> <87d07gk24l.fsf@nanos.tec.linutronix.de> <20200508190226.GA31465@wind.enjellic.com> <20200508195635.GR27052@linux.intel.com> <20200514091637.GA25156@wind.enjellic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200514091637.GA25156@wind.enjellic.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 14, 2020 at 04:16:37AM -0500, Dr. Greg wrote: > What we would recommend at this point is that you and Jarkko do the > Linux community and beyond a favor and wire up a simple kernel > command-line parameter that controls the ability of the driver to be > used, ie. enables/disables access to /dev/sgx/enclave. I'm not opposed to adding a kernel param to disable SGX. At one point there was a proposal to extend clearcpuid to allow disabling multiple feature bits, but it looks like that went the way of the dodo. Note, such a param would disable SGX entirely, e.g. clear the feature bit in /proc/cpuinfo and prevent any in-kernel SGX code from running.