Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1022534pxk; Fri, 25 Sep 2020 04:19:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOdgq3n55NXy+ozhzU9j2oPKXnY2Re96FLjcY351djzLhpQE/1xqaf5XPNukizBHClyM8Z X-Received: by 2002:a17:906:d9c3:: with SMTP id qk3mr2159046ejb.207.1601032752068; Fri, 25 Sep 2020 04:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601032752; cv=none; d=google.com; s=arc-20160816; b=LpeL5lYHHSQpCFwnvWiR6GvvhvbYKxAFZD4qhofk2pQfe5XQDzeEXEAF6WtwtFP3Y1 jUflblPIwqaVv2VSNSWQoocc+OSv/HJTbksedCEF7z0af3j5gSMEP6ZaIf1VbCVKjsf/ iaTemJkEXmoWXjts8lBbCGjGRQXRITw6ik2DQcnNhJtz/Sv6Z5pTscjwDm9E3esi40Ya v7TMrQbwS7lzaACFHG368SFgAmdtR0ch7OyzKqKfKdZY31bllVMHFAUaCqgMXRaZxcVm e/iRHqipQ4kwfRd/RD3ibKki5/ZPHGy8GdWQF+yhb6RH7xaEnC6JrUUol/AgK6nfvJrK DarA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=qEU+e6yS+44g948HBQUMGzOQU5whiQ14u+SVebx9Ww4=; b=nn9ZpucAl1DG7BqJDUn9u0o0jXRAWVpXnQT5xiSNZ5CeQ6dTYXYlAFLDu3wTv0moHD /wqPMk3cjETnZ6hU917w8UDcCZCaJqWPCEeLiLWm/6icQMMKymdk88x0ILWqzo9DzqPq HqIRnPd5ibhV0C4TXak/hb2bFuYPKItdgTLgYgB07+UQegq8maRjcUFUYNI9nGUJU6he DrF9OMmUKycX3L/VXrPM4FFwUdacVSt9GwihyMLjoX9HEUnUOxNZEzTKJDI6TnvvQ6AH HKaa3KOC775UsowkE1Y5Tilg3pczWZK5FryY5TJClmjPUK09ew8C21H5cSZoau6Bteln g+qg== 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 r24si1655027edc.149.2020.09.25.04.18.49; Fri, 25 Sep 2020 04:19:12 -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 S1727749AbgIYLRW (ORCPT + 99 others); Fri, 25 Sep 2020 07:17:22 -0400 Received: from mga17.intel.com ([192.55.52.151]:34866 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727044AbgIYLRW (ORCPT ); Fri, 25 Sep 2020 07:17:22 -0400 IronPort-SDR: Xg3Pth2/UcI6oUbDX9YRlyfi/5QxX5wmDRc06nnLx3Qe3HTsjWRh8mT8UXuXukNs3NhE4QlNnv e+YhVTWYzUng== X-IronPort-AV: E=McAfee;i="6000,8403,9754"; a="141524145" X-IronPort-AV: E=Sophos;i="5.77,301,1596524400"; d="scan'208";a="141524145" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 04:17:21 -0700 IronPort-SDR: 8Z+81PwrOv/+Jds0OOJUHL6ddEa765YW1gB8rB7i5U5GoJD/fmphAblM2K5nKvUPDZ1gESLShI 1vJF35NRfFFQ== X-IronPort-AV: E=Sophos;i="5.77,301,1596524400"; d="scan'208";a="487430760" Received: from tjhenson-mobl.amr.corp.intel.com (HELO localhost) ([10.252.48.117]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 04:17:15 -0700 Date: Fri, 25 Sep 2020 14:17:13 +0300 From: Jarkko Sakkinen To: Jethro Beekman Cc: Borislav Petkov , x86@kernel.org, linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson , Andy Lutomirski , Cedric Xing , akpm@linux-foundation.org, andriy.shevchenko@linux.intel.com, asapek@google.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, npmccallum@redhat.com, puiterwijk@redhat.com, rientjes@google.com, tglx@linutronix.de, yaozhangx@google.com Subject: Re: [PATCH v38 21/24] x86/vdso: Implement a vDSO for Intel SGX enclave call Message-ID: <20200925111713.GD180915@linux.intel.com> References: <20200915112842.897265-1-jarkko.sakkinen@linux.intel.com> <20200915112842.897265-22-jarkko.sakkinen@linux.intel.com> <20200924180407.GO5030@zn.tnic> <20200925010031.GH119995@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 25, 2020 at 10:39:58AM +0200, Jethro Beekman wrote: > On 2020-09-25 03:00, Jarkko Sakkinen wrote: > > End result: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-sgx.git/tree/arch/x86/include/uapi/asm/sgx.h > > > > I'm wondering this sentence: > > > > "The calling convention is custom and does not follow System V x86-64 ABI." > > > > AFAIK, now the vDSO is fully C-callable but waiting for feedback before > > removing it. > > It's C-callable *iff your enclave follows the System V x86-64 ABI*. In > addition, all registers not clobbered by the SGX ISA are passed to the > enclave, not just those specified as parameter passing registers in > the ABI. This is intentional to make the vDSO function usable in > applications that use the current flexibility of ENCLU. Hold on, I really want to fix this bit of documentation before sending any new version, so I'll explain how I understand it. I think it is just SystemV ABI call with six parameters in the usual GPRs (rdi, rsi, rdx, rcx, r8, r9). I'm looking at vdso_sgx_enter_enclave. What I'm not getting? > -- > Jethro Beekman | Fortanix /Jarkko