Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1043944img; Fri, 22 Mar 2019 14:21:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpOTozMOTsAafBiJVH/4HFOzEwBzymwNZoC9ffx9yYF8AewV6q4bOmDIfrbw9alohMvXuZ X-Received: by 2002:a62:1d90:: with SMTP id d138mr11258588pfd.232.1553289682558; Fri, 22 Mar 2019 14:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553289682; cv=none; d=google.com; s=arc-20160816; b=PIbfWdvFeIvzwPkZmPEdp/Mjcq0teqa3I92it8d9oAh2f5FDOBfMD1NaxZ+qu/JB4c GUnRgL2iPS04KERqvjLzlwmxVvrN9gMM+7SfbbsS15vrkfG3VGSgbi5khA62OleEGMum STDuLFBjvmQq5PYrMcSyC+GqIIQ0trmitIJ+SUZ/f4NfpArYBMmCJGIUxMykMOUHPY4B Fz5R8NbiZcalHA0gm1DAdrctucrKV/9S1+eGZAJ2VxNSHM9ID93UMHSLIp49bCo9H+RI ys8S8yDbOZ1vSxilK+P7QHwoQJtGSNkexkVpAxAUt1h7maMxEEZdW6IOoKksH+TdpgVu +bcQ== 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 :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=B6pUwc5QX+t8y3Y3be9CB6GLcW9k82O5KdkNolwhQZQ=; b=mz/fNA12LzWKVOeeUJGLYaJ3tD4/Yq23dO6HdiA5B02xEtqtgbbW4e7pjCkNX0QZBy stvLMmaDt3pDQbtal91rlFpd8DwUqYxu6BT4M+xE5BKt9O01XzlQDEWwJDM679+yeJUS 8euRYuv2eZsD+oU4gOvo8XF91uxqQY1dP8TK4mDZyKbGiPRC9dM7uNHE9qUcPpyQReqG jjifpPmJRffjRdVvhUEkfLX/yzk65fjWmzWTZGWj77iTcYQd1+9Cv+b575fBLKfV7mow Ieb7mKirf0kTUVcU5dkTE+5EP5bIDQWUBggi5jENKIUXT7kJj1qZyMCvJM0vjSvfG2yv 9KvA== 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 k86si7699472pfj.145.2019.03.22.14.21.05; Fri, 22 Mar 2019 14:21:22 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727544AbfCVVUT (ORCPT + 99 others); Fri, 22 Mar 2019 17:20:19 -0400 Received: from mga07.intel.com ([134.134.136.100]:34486 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727075AbfCVVUS (ORCPT ); Fri, 22 Mar 2019 17:20:18 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Mar 2019 14:20:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,256,1549958400"; d="scan'208";a="144426581" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.181]) by orsmga002.jf.intel.com with ESMTP; 22 Mar 2019 14:20:15 -0700 Date: Fri, 22 Mar 2019 14:20:15 -0700 From: Sean Christopherson To: "Xing, Cedric" Cc: Andy Lutomirski , Jarkko Sakkinen , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "linux-sgx@vger.kernel.org" , "akpm@linux-foundation.org" , "Hansen, Dave" , "nhorman@redhat.com" , "npmccallum@redhat.com" , "Ayoun, Serge" , "Katz-zamir, Shay" , "Huang, Haitao" , "andriy.shevchenko@linux.intel.com" , "tglx@linutronix.de" , "Svahn, Kai" , "bp@alien8.de" , "josh@joshtriplett.org" , "Huang, Kai" , "rientjes@google.com" , Dave Hansen , Haitao Huang , Jethro Beekman , "Dr . Greg Wettstein" Subject: Re: [PATCH v19,RESEND 24/27] x86/vdso: Add __vdso_sgx_enter_enclave() to wrap SGX enclave transitions Message-ID: <20190322212011.GD12666@linux.intel.com> References: <20190320162119.4469-1-jarkko.sakkinen@linux.intel.com> <20190320162119.4469-25-jarkko.sakkinen@linux.intel.com> <960B34DE67B9E140824F1DCDEC400C0F4E85C484@ORSMSX116.amr.corp.intel.com> <960B34DE67B9E140824F1DCDEC400C0F4E85C53D@ORSMSX116.amr.corp.intel.com> <20190320210313.GJ30469@linux.intel.com> <960B34DE67B9E140824F1DCDEC400C0F4E85C6B5@ORSMSX116.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <960B34DE67B9E140824F1DCDEC400C0F4E85C6B5@ORSMSX116.amr.corp.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 20, 2019 at 05:17:53PM -0700, Xing, Cedric wrote: > > On Wed, Mar 20, 2019 at 12:57:52PM -0700, Xing, Cedric wrote: > > > > Using the untrusted stack as a way to exchange data is very > > > > convenient, but that doesn't mean it's a good idea. Here are some > > > > problems it > > > > causes: > > > > > > > > - It prevents using a normal function to wrap enclave entry (as > > > > we're seeing with this patch set). > > > > > > It doesn't prevent. > > > > Yes it does, keyword being "normal". Though I guess we could do a bit > > of bikeshedding on the definition of normal... > > I don't understand what you mean by "normal". My apologies, I missed the code snippet in your original code, I was thinking of a previous idea involving a JMP %rbp. Please ignore this bit of discussion.