Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5394296ybl; Tue, 14 Jan 2020 08:14:09 -0800 (PST) X-Google-Smtp-Source: APXvYqwKpn0Ivprh5j0jMhiUcG+B1Uh/ZDoKkV6PezU1hOn+KjBT253V9llgxUB7LKRs8wiMCYef X-Received: by 2002:aca:f0b:: with SMTP id 11mr18057401oip.34.1579018449580; Tue, 14 Jan 2020 08:14:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579018449; cv=none; d=google.com; s=arc-20160816; b=fJNasje7k4s3dk3QDJfL4B2zYNjyoLm2oBUdsRQFKl4pyEbR1lytsvwDaoEquDX7Au drL1ZIJnkpRx/SdKS1SgNQjZz+HCHUxKgG1Su/JN9sKL7Igu3Bpv/VY8Xorc6LGFomap ZKBe/xEWz3aZEtiWaepKaG76wThTmHoaZp8XDiJVIKoQr6ucclkaU4psJNuxYtBQQF17 r9sDHIRJDktuBQ1n9+DejMNMqnbTVFibWztUl444ntKNe977RkBWR/8IBbLW9cvO6STi itmdEpc7ZVjf5C8qq6OW4aP/dvMwR0GjkIjJm5b0pzDCnIQUIfKkRwpLBrDcfHSvmyd3 dSiQ== 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:message-id :organization:from:content-transfer-encoding:mime-version:date :references:reply-to:subject:cc:to; bh=Gv+5cT7ubJFh6WOaBWUAICRuBQ0Hqxpljgc1IDJp+Hs=; b=h45WsJ+9pvB0PUzGC0lDqt1a0lRPT3wV0DJNArbcKJwQEk2Y4Uox1qJZjwFGEldQ2T 5LGBzn2CisVOFdlceu5J30G//Q91JlvWCExH/kdS8W060zmW9fZnM+6xTjrBLPF+WEk7 IdInjqVep9AAxlghgIPbSHVD9fgLosHIue77TBi6hoYnNMwOpcF1wLpYUQIpD9EUtSZy bltGBduSSfj/SfhZYTL/jBTRz+zGmgJVHRgwLTrE9PD+WTtSofit2kzuI9mu5F1CM+/M DG7SttVktTp8qBwm0f/E+HBK53U8ul1Y8ODMW290JIOnFejU2mlTLwxaoMOUk9dFJs+P ZeZg== 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 f15si7954908oib.61.2020.01.14.08.13.58; Tue, 14 Jan 2020 08:14:09 -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 S1729353AbgANQMu (ORCPT + 99 others); Tue, 14 Jan 2020 11:12:50 -0500 Received: from mga07.intel.com ([134.134.136.100]:58605 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729263AbgANQMt (ORCPT ); Tue, 14 Jan 2020 11:12:49 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2020 08:12:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,433,1571727600"; d="scan'208";a="217788065" Received: from hhuan26-mobl.amr.corp.intel.com ([10.255.37.212]) by orsmga008.jf.intel.com with ESMTP; 14 Jan 2020 08:12:45 -0800 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org, "Jarkko Sakkinen" Cc: akpm@linux-foundation.org, 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@intel.com, andriy.shevchenko@linux.intel.com, tglx@linutronix.de, 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, linux-security-module@vger.kernel.org, "Suresh Siddha" Subject: Re: [PATCH v24 12/24] x86/sgx: Linux Enclave Driver Reply-To: haitao.huang@linux.intel.com References: <20191129231326.18076-1-jarkko.sakkinen@linux.intel.com> <20191129231326.18076-13-jarkko.sakkinen@linux.intel.com> Date: Tue, 14 Jan 2020 10:12:45 -0600 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Haitao Huang" Organization: Intel Message-ID: In-Reply-To: <20191129231326.18076-13-jarkko.sakkinen@linux.intel.com> User-Agent: Opera Mail/1.0 (Win32) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Nov 2019 17:13:14 -0600, Jarkko Sakkinen wrote: > +static int sgx_encl_init(struct sgx_encl *encl, struct sgx_sigstruct > *sigstruct, > + struct sgx_einittoken *token) > +{ > + u64 mrsigner[4]; > + int ret; > + int i; > + int j; > + > + /* Check that the required attributes have been authorized. */ > + if (encl->secs_attributes & ~encl->allowed_attributes) > + return -EINVAL; > + EACCES to be more specific? Thanks Haitao