Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp438919pxa; Thu, 27 Aug 2020 06:36:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySOTj43i8TvaorGdq4Go/d9BBiwnqNrQRYpo3H1+pPXH2QK9BKJEP36wr+J/guueZhRlOD X-Received: by 2002:a50:d082:: with SMTP id v2mr20252077edd.348.1598535381660; Thu, 27 Aug 2020 06:36:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598535381; cv=none; d=google.com; s=arc-20160816; b=qLsc0mtqWIUkEVyFFIPJQodTxJErFDFN4O9luE4SCaWbEbLc+CfXmVxyiBY8xSriiU LPErwCRVnZNeKhP3zVjSTOyr1wlqN+eh3RAoWhYLVl06xMYFG6sdvZYu5fnK8XuH7Wp1 8cVL+a7G5g2T+UprrsXmLmSViJzUv0lQIrCmTs9IoXDrGv9OWsCRPANckSCCOIA18ePA mPFrBHRqczjJIk3bwYZTTu4bd8LN5aeGQA2O9j/X7qAZS5OYiY46cF9by2mFhvvDij35 lRiljPME4l3yyhwRfPXXWvo+ukYgT9vb9HpoKygf0OdaIXUuLPhHG9RU5CQQS0EB6JIt VKUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=r7earNTtSL3D0OJa+Uwe4Zfw+f4FaWCh8hnyesNK+P4=; b=yfdHpp2HEjGf2jHxJQ3krwgidSsiMzEatTNFiq3GzjslaX/0KFR9P+NB4KIds11v3w GA+3iujmlqRBK1c2/y0qwxKEB5gKsw3c5Hw41io9Mkqou50FFlVI/Ox5IxSsbQLCGZRA TdlOAYTuBO7rTEDUZi6s9LHrOhlh33iW1bNmmIO/OOaHhU5YTXXBR4XHlDm4wER++Bch 4MPd1tznXRy1dPRXAxF/pC3geUZXHfbW23pVMA8ArxxQX79pogK08cYSDNbsVdmmE4op yrRsj244CGuytnNwow4hJ8ZG0KKv7INxxFJK09kkqiZRQ+g8c/pIUJB10XpUDGQFgG+H Fd1Q== 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 qw24si1413059ejb.197.2020.08.27.06.35.59; Thu, 27 Aug 2020 06:36:21 -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 S1727990AbgH0Nbw (ORCPT + 99 others); Thu, 27 Aug 2020 09:31:52 -0400 Received: from mga04.intel.com ([192.55.52.120]:42293 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728018AbgH0N0Z (ORCPT ); Thu, 27 Aug 2020 09:26:25 -0400 IronPort-SDR: P0z2pDtIWxxFq38bvNzr4kQqYjLagW4ExrFnRyLR3+iWMiwvmMA8zlmlDSfCmnvYVShHmDzYWu WxBzv+it4M/Q== X-IronPort-AV: E=McAfee;i="6000,8403,9725"; a="153895895" X-IronPort-AV: E=Sophos;i="5.76,359,1592895600"; d="scan'208";a="153895895" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Aug 2020 06:24:50 -0700 IronPort-SDR: Ke2l8t9YhErArjp+te+yH/vIPFO56rsQI3/DhOc+Xg4yTzOeKSk3G0u9JyOR4VVUSOGnOS1shn azdhMXNXazYQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,359,1592895600"; d="scan'208";a="323592489" Received: from tbeaumon-mobl3.ger.corp.intel.com (HELO localhost) ([10.252.55.254]) by fmsmga004.fm.intel.com with ESMTP; 27 Aug 2020 06:24:43 -0700 Date: Thu, 27 Aug 2020 16:24:36 +0300 From: Jarkko Sakkinen To: Borislav Petkov Cc: x86@kernel.org, linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org, Jethro Beekman , Haitao Huang , Chunyang Hui , Jordan Hand , Nathaniel McCallum , Seth Moore , Sean Christopherson , Suresh Siddha , 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, luto@kernel.org, nhorman@redhat.com, puiterwijk@redhat.com, rientjes@google.com, tglx@linutronix.de, yaozhangx@google.com Subject: Re: [PATCH v36 12/24] x86/sgx: Add SGX_IOC_ENCLAVE_CREATE Message-ID: <20200827132436.GA4674@linux.intel.com> References: <20200716135303.276442-1-jarkko.sakkinen@linux.intel.com> <20200716135303.276442-13-jarkko.sakkinen@linux.intel.com> <20200826145239.GC22390@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200826145239.GC22390@zn.tnic> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 26, 2020 at 04:52:39PM +0200, Borislav Petkov wrote: > On Thu, Jul 16, 2020 at 04:52:51PM +0300, Jarkko Sakkinen wrote: > > diff --git a/Documentation/userspace-api/ioctl/ioctl-number.rst b/Documentation/userspace-api/ioctl/ioctl-number.rst > > index 59472cd6a11d..35f713e3a267 100644 > > --- a/Documentation/userspace-api/ioctl/ioctl-number.rst > > +++ b/Documentation/userspace-api/ioctl/ioctl-number.rst > > @@ -323,6 +323,7 @@ Code Seq# Include File Comments > > > > 0xA3 90-9F linux/dtlk.h > > 0xA4 00-1F uapi/linux/tee.h Generic TEE subsystem > > +0xA4 00-1F uapi/asm/sgx.h Intel SGX subsystem (a legit conflict as TEE and SGX do not co-exist) > > Again, maybe add ? > > This is from a previous review - please be more careful when addressing > review comments - either do them or object to them but silently ignoring > them is not cool. > > > 0xAA 00-3F linux/uapi/linux/userfaultfd.h > > 0xAB 00-1F linux/nbd.h > > 0xAC 00-1F linux/raw.h > > diff --git a/arch/x86/include/uapi/asm/sgx.h b/arch/x86/include/uapi/asm/sgx.h > > new file mode 100644 > > index 000000000000..3787d278e84b > > --- /dev/null > > +++ b/arch/x86/include/uapi/asm/sgx.h > > @@ -0,0 +1,25 @@ > > +/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) WITH Linux-syscall-note */ > > checkpatch is not happy about something: > > WARNING: 'SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) WITH Linux-syscall-note */' is not supported in LICENSES/... > #79: FILE: arch/x86/include/uapi/asm/sgx.h:1: > +/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) WITH Linux-syscall-note */ I don't know what has gone in my head when I wrote that but it looks plain wrong even without running checkpatch.pl The line should express the dijunction of "GPL-2.0+ WITH Linux-syscall-note" and "BSD-3-Clause". Grepping the kernel tree, I can find 34 instances of these in uapi files: /* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */ I have not checked if this passes checkpatch.pl yet, but I would be surprised if that did not pass (obviously I'll check that). > > ... > > > +/** > > + * sgx_ioc_enclave_create - handler for %SGX_IOC_ENCLAVE_CREATE > > + * @filep: open file to /dev/sgx > > Also from a previous review: > > "That's > > @encl: enclave pointer > > or so." Yes, for sure. Thanks. > > + * @arg: userspace pointer to a struct sgx_enclave_create instance > > + * > > + * Allocate kernel data structures for a new enclave and execute ECREATE after > > + * verifying the correctness of the provided SECS. > > + * > > + * Note, enforcement of restricted and disallowed attributes is deferred until > > + * sgx_ioc_enclave_init(), only the architectural correctness of the SECS is > > + * checked by sgx_ioc_enclave_create(). > > From that same review: > > "Well, I don't see that checking. Where is it?" > > Ok, I'm going to stop here. Please go over v33's review and either > address *all* feedback or incorporate it into your patches if you agree > with it but do not silently ignore it. One of the things I very strongly > detest is ignored review comments. I'm sorry about that. This was not intentional. I'll revisit them by going through all your responses from here: https://patchwork.kernel.org/patch/11581715/ v34 had the splitting of the big driver patch into multiple patches. During that process I've obviously failed to address these. > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette /Jarkko