Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2856000imu; Mon, 19 Nov 2018 07:09:16 -0800 (PST) X-Google-Smtp-Source: AJdET5d0gQTm96yq2dMrRCVZ4yCMfcUDoMF8QoKpj2eiKJOJ75zApWJjuRvaL29BSTlDhimDqqCC X-Received: by 2002:a63:d252:: with SMTP id t18mr20500589pgi.133.1542640156883; Mon, 19 Nov 2018 07:09:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542640156; cv=none; d=google.com; s=arc-20160816; b=Wk9dIlR7iVIB5uUpCK8ZPnF03Z2/REY45cPc0yYIIh/EMF65Zlfn/KUUjCydI8Im1g +xXDgUMD5Vi48bRlJGeRg9slC4A/Mx9rj5xlp4kqAfIRWnyDS3YQskVgZjFhEHRydqAN ewG7jYmTDwZVMDOa5dAav3mG8rQU+VQ3JJ54S4RQgitwIZ+vvgFkyI1Sb5T1ozXUlWTL Tk3BlJ+J/vKiDxO0hXa55wHj8KOrSGsHN8HKZ2saIfa67Ta/+0m2RwoqN6UMJ/BzkSUJ khioWr5YEDuNb9wq10xNOUe6tRVyos/79Ijyi2DwPX4oeieGcWNbgAKIMGTbJgcN0l8x DLZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=1uPHXIYDdN22jA7eIKBHrGhbL81pDDtoJDxrphs3VDU=; b=XTbwHRHYRrdyB/3dLRALIv6EJCahG0cTDQz75eRAuGrBUYtGfCh87+ZiZUt97y/O6H Vi6ZlkFtIbIVJ+Oq62H2ERUA2dQKnMBXXyEUOpexdqjt3joyWhg/ai4+TMOHWm8opVFu kr4uLYpq33Tcsh3NX4PZCLsMu89rEoDLpKmrLPX0/ejJq8RolQIw9qN365sl1zLlIfvX ndXsv6S+llE5gvTazyC5XVU7xS9BjGgoxuRqyESb+sQIjyXc5LZ3WdLhkh5ndKw/jEM8 8Zca5z6gypHO+U0rK0fONIvE32anI1P987Cx7BMmfI8MGQr+RkevRZWowS43gC/LbW6r 3m2Q== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 22si38082263pgl.107.2018.11.19.07.08.57; Mon, 19 Nov 2018 07:09:16 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729660AbeKTBay (ORCPT + 99 others); Mon, 19 Nov 2018 20:30:54 -0500 Received: from mga04.intel.com ([192.55.52.120]:23022 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729483AbeKTBay (ORCPT ); Mon, 19 Nov 2018 20:30:54 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Nov 2018 07:07:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,252,1539673200"; d="scan'208";a="97452161" Received: from tmuluk-mobl4.ger.corp.intel.com (HELO localhost) ([10.249.254.135]) by FMSMGA003.fm.intel.com with ESMTP; 19 Nov 2018 07:06:56 -0800 Date: Mon, 19 Nov 2018 17:06:55 +0200 From: Jarkko Sakkinen To: x86@kernel.org, platform-driver-x86@vger.kernel.org, linux-sgx@vger.kernel.org Cc: dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, serge.ayoun@intel.com, shay.katz-zamir@intel.com, haitao.huang@linux.intel.com, andriy.shevchenko@linux.intel.com, tglx@linutronix.de, kai.svahn@intel.com, mark.shanahan@intel.com, luto@amacapital.net, Suresh Siddha , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Darren Hart , Andy Shevchenko , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH v17 18/23] platform/x86: Intel SGX driver Message-ID: <20181119150655.GA11843@linux.intel.com> References: <20181116010412.23967-1-jarkko.sakkinen@linux.intel.com> <20181116010412.23967-19-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181116010412.23967-19-jarkko.sakkinen@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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 Fri, Nov 16, 2018 at 03:01:25AM +0200, Jarkko Sakkinen wrote: > Intel Software Guard eXtensions (SGX) is a set of CPU instructions that > can be used by applications to set aside private regions of code and > data. The code outside the enclave is disallowed to access the memory > inside the enclave by the CPU access control. > > SGX driver provides a ioctl API for loading and initializing enclaves. > Address range for enclaves is reserved with mmap() and they are > destroyed with munmap(). Enclave construction, measurement and > initialization is done with the provided the ioctl API. > > Signed-off-by: Jarkko Sakkinen > Co-developed-by: Sean Christopherson > Signed-off-by: Sean Christopherson > Co-developed-by: Serge Ayoun > Signed-off-by: Serge Ayoun > Co-developed-by: Shay Katz-zamir > Signed-off-by: Shay Katz-zamir > Co-developed-by: Suresh Siddha > Signed-off-by: Suresh Siddha Question: should be dissolve the driver completely and move this code to arch/x86/kernel/cpu/sgx/ (and rename intel_sgx.c as main.c)? Swapping patch removes the possibility to compile this as a module anyway. Would make also maintainer hierarchy more clear and clean albeit that cannot be a guiding reason to do such change. Here's the current MAINTAINERS entry in my master: INTEL SGX M: Jarkko Sakkinen M: Sean Christopherson L: linux-sgx@vger.kernel.org S: Maintained Q: https://patchwork.kernel.org/project/intel-sgx/list/ T: git https://github.com/jsakkine-intel/linux-sgx.git F: arch/x86/include/asm/sgx.h F: arch/x86/include/uapi/asm/sgx.h F: arch/x86/kernel/cpu/intel_sgx.c F: drivers/platform/x86/intel_sgx/* K: \bSGX_ If we do this, we would end up with this: INTEL SGX M: Jarkko Sakkinen M: Sean Christopherson L: linux-sgx@vger.kernel.org S: Maintained Q: https://patchwork.kernel.org/project/intel-sgx/list/ T: git https://github.com/jsakkine-intel/linux-sgx.git F: arch/x86/include/asm/sgx.h F: arch/x86/include/uapi/asm/sgx.h F: arch/x86/kernel/cpu/sgx/* K: \bSGX_ Then once the base code has been merged I would put my PRs to x86 maintainers for subsequent kernel releases. /Jarkko