Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1100165imm; Thu, 5 Jul 2018 14:51:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdLpWAYjjhEPxWISUv4WcpvKeoN38Jgg9LTBiOaDrmkPrG+bnHjtzRG1RzYh4f8gPnfWkET X-Received: by 2002:a17:902:ba97:: with SMTP id k23-v6mr7803170pls.259.1530827491884; Thu, 05 Jul 2018 14:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530827491; cv=none; d=google.com; s=arc-20160816; b=lfvYHa5md8Sd8F8pUwq/nuSgO/LLtwPPTIu1n6e1MHBRtgTdTyTAd1VVgqEuh//kqG gQdAmeZpRsulJBylx1PVU8eK5LzIhynhTMLotc/+L7g6qoXHrs6mmGczOjM6iem8JRCb Fw5/Wt05J2BgA10ot2uftabc6U6o0YB7QcQkAoYdQuiKzv8hZoxMVOpcbGAK7PftuAKJ rYLs7niS8Y5ffnkrJMPuDiM1ARo77u3oivvZKhgAzgIYLKGzgW+oDUdsQUr1vpf0026T CpM3MT6/CrazZ85/Tgw8O4NS6mcxtEL43aqfDEnTXT2ydDyUQ74wB+le7ZcbuEwarC58 kzCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:arc-authentication-results; bh=Qxtuv2zmHAUeAWNNkCtaFSUGBlgdSSEvuSFNhpUel+A=; b=biq1r/3rv2Tr7KhCXS4OPDO+cawwveEK+6jl8+4qGVICYu8W96BmPOZZpFd5pvaeeJ mOvlsd4RDhrzo6V4bCdW0Cx01boTH2dMAHlHGqiFYlgsv++lB1rcFYhcf8IJbgMNtHMg ISmwdUZn/gYFP9Fu2v+VvTLgm8+hVrSKcwwH27v5x4JKKKiAlv52qYJxQr0zaEV3ZrAy eSYJ9mjPBckVERvsuJC5yV0pkkXgLuVu/Q5KgRtmIyiqkSTg7gaGolVomTkpkdqJGTm7 nUSp6B/iH6d2JZ3cMcS6al2wZ53lIkSvkX3rvxgbdps/5oMD9ozTis1sVVqltq9W6b4K HgAw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16-v6si6829306pfi.183.2018.07.05.14.51.17; Thu, 05 Jul 2018 14:51:31 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753868AbeGEVu0 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 5 Jul 2018 17:50:26 -0400 Received: from terminus.zytor.com ([198.137.202.136]:57941 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753451AbeGEVuZ (ORCPT ); Thu, 5 Jul 2018 17:50:25 -0400 Received: from wld62.hos.anvin.org (c-24-5-245-234.hsd1.ca.comcast.net [24.5.245.234] (may be forged)) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id w65LoD8b1202289 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 5 Jul 2018 14:50:13 -0700 Date: Thu, 05 Jul 2018 14:50:05 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20180705200912.GA10701@linux.intel.com> References: <20180703182118.15024-1-jarkko.sakkinen@linux.intel.com> <20180703182118.15024-6-jarkko.sakkinen@linux.intel.com> <20180705200912.GA10701@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH v12 05/13] x86/sgx: architectural structures To: Jarkko Sakkinen , Dave Hansen CC: x86@kernel.org, platform-driver-x86@vger.kernel.org, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, linux-sgx@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" From: hpa@zytor.com Message-ID: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On July 5, 2018 1:09:12 PM PDT, Jarkko Sakkinen wrote: >On Thu, Jul 05, 2018 at 08:31:42AM -0700, Dave Hansen wrote: >> On 07/03/2018 11:19 AM, Jarkko Sakkinen wrote: >> > +struct sgx_secs { >> > + uint64_t size; >> > + uint64_t base; >> > + uint32_t ssaframesize; >> > + uint32_t miscselect; >> > + uint8_t reserved1[SGX_SECS_RESERVED1_SIZE]; >> > + uint64_t attributes; >> > + uint64_t xfrm; >> > + uint32_t mrenclave[8]; >> > + uint8_t reserved2[SGX_SECS_RESERVED2_SIZE]; >> > + uint32_t mrsigner[8]; >> > + uint8_t reserved3[SGX_SECS_RESERVED3_SIZE]; >> > + uint16_t isvvprodid; >> > + uint16_t isvsvn; >> > + uint8_t reserved4[SGX_SECS_RESERVED4_SIZE]; >> > +} __packed __aligned(4096); >> >> Why are the uint* versions in use here? Those are for userspace ABI, >> but this is entirely for in-kernel-use, right? >> >> We've used u8/16/32/64 in arch code in a bunch of places. They're at >> least a bit more compact and easier to read. It's this: >> >> u8 foo; >> u64 bar; >> >> vs. this: >> >> uint8_t foo; >> uint64_t bar; > >The reason was that with in-kernel LE these were in fact used by >user space code. Now they can be changed to those that you >suggested. > >/Jarkko For things exported to user space use __u* and __s* types... the _t types would actually violate the C standard with respect to namespace pollution. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.