Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp180926pxa; Wed, 26 Aug 2020 07:55:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCO1G4M1p3wfhhBS6R4NkYr5hwJlLQYYyBQ9hW3hHSi29k3tEJggq/xkjKX4ESrHIAxp4e X-Received: by 2002:a17:906:34c7:: with SMTP id h7mr16718311ejb.50.1598453711385; Wed, 26 Aug 2020 07:55:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598453711; cv=none; d=google.com; s=arc-20160816; b=QBrFcf9TWxgC5SVXcrl2hL6hDcPqY/NThab8NhsdNe2POMCV7XjjrrwqHfzUgPuxYE bHYhrwDOolhUa3phVkKWeH+2WeCt52ZrszxQMNn3Hf2Vsh15dFGzECkL3jfz8+kRLbMC 7prmlEyMpZyvf+1EPx927Z5PIssbA8UX5hG9P3jpBXqIeWYi1CX93nyepm6U1QKinpim H2smfJhCYfHdpsywtSY0gdf40MVJzgHL4/NvaiWPlV3GVkWlldt5GoDR8THzs5TGiXnP AXHsiLfPXCiaNxhYEyg291lQ5/FcedoYg8lAlDroqIQbx6Loak/RFoFIXLPbiJG9BF/v HwWw== 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=jnsI/iKNmqsnOjPIZNdv4vnNfxJjeQ2wcvfdfUU1q0Y=; b=kk2TbLJKoLLD2ozxIVg48uvWjN77Hp/8b5Jnt4ClbN1T+nMZutevutwQJbuNlVWWFK yNcpf8YHYcPF0TVf4oik2Zdy4QHN0u2G9Mb+JB/2RmGy8I5C1ydrZZJdv09xR7DRPJiG Kpp1U7EMVpvBUYKI8PUWBfJvS65kSzlHi9U6M14rJcLBXZxZylr0+agNbGSEJuQO6yh8 uTcZulYMxGyQeQ7LneGVeIxWUm/cMOs3LG4XEjrmt6U4W78uF8389L3MQKwg/kRJAwSg WJYCrPad4EsQJHtNXJXDDjEL5Szn4hMJoPBbGkPYUo9vvyZCltmJUYjSn8GXjb60Mndl 1dfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=C9cifg0t; 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 v19si1537987edx.39.2020.08.26.07.54.48; Wed, 26 Aug 2020 07:55:11 -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=C9cifg0t; 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 S1728208AbgHZOxL (ORCPT + 99 others); Wed, 26 Aug 2020 10:53:11 -0400 Received: from mail.skyhub.de ([5.9.137.197]:43130 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728146AbgHZOwp (ORCPT ); Wed, 26 Aug 2020 10:52:45 -0400 Received: from zn.tnic (p200300ec2f0cee00b9d687b85fd363f9.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:ee00:b9d6:87b8:5fd3:63f9]) (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 75F681EC0347; Wed, 26 Aug 2020 16:52:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1598453562; 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=jnsI/iKNmqsnOjPIZNdv4vnNfxJjeQ2wcvfdfUU1q0Y=; b=C9cifg0tLhB4V2DukbiUnvLsZKGU3rGL+iqq1vZ5Xb4ptofIdUpqe1J4oHKWyTq+S/ybrZ mxOSh8gF/AQsmCKeaBbyQY8uy8wgt9hWES9YJc91bh7fqaFwwrgGbjyh1dKgIb5+Ixy1P6 /nxSYaBvAQ0N9NP68DG2coKAFVN63ac= Date: Wed, 26 Aug 2020 16:52:39 +0200 From: Borislav Petkov To: Jarkko Sakkinen 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: <20200826145239.GC22390@zn.tnic> References: <20200716135303.276442-1-jarkko.sakkinen@linux.intel.com> <20200716135303.276442-13-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200716135303.276442-13-jarkko.sakkinen@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 */ ... > +/** > + * 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." > + * @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. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette