Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9748158ybi; Wed, 10 Jul 2019 16:17:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwGB+J7oEKFf5p3xji/WjJawuNbbW5ZVya+tCr4BlKSFxgi2G9V8Zx2A3V1oUeipAS3RrYw X-Received: by 2002:a65:4507:: with SMTP id n7mr856946pgq.86.1562800659099; Wed, 10 Jul 2019 16:17:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562800659; cv=none; d=google.com; s=arc-20160816; b=Dx+xXn8P+Bs80RmBbJ4fgSv05h7jrL/kc8/RGUnB5ZVNI9UTgd3dN1CCfGmqFsiqZe DWve4pvhoNVE4wFCgFSnL9mKTbQKg9asLBRMg72+l+V8Ms7bCr0Ds4YyyLief8YkbvzG W1LzRo6zokV2C5T4VD8OTntev9rxgKWvwwV9dq1VgsEVhIFVz7SyH4PufYiTanmBjVxO itqzepcM7FbyExdNLaMlfXotMdNcUZLuwNQ7JTGaIH0pXeofT4uoKuShDd1uzz0kxSl0 HZUnkUK38ijrQ3A9gX69on/k725nqq7L5BVDYAHdkDmM6rLQGOC2ZIZGbEDaLmoJWlh1 1KGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=m5sBpZSyN823KrH11OqE4n8UDRv7+j7Gjo8LCBzdaxg=; b=KPjNOUF39+PlS9MYW6Rs69I54tI0qxvHmPPXZhYkvZiC1GTWbhxFz9GjxzaKODhIbV s719YAyUbmi0kCqHChzxpBoiorXccLpB54z1pc5ldXsF3grbsxYRuhlvFh6VVKRG9lne q4IeYg1rXrI61cq97MTqfkQgeinpqDUd2RfFvkYvjhiQrdFMmQoMwqfini7G7tp/lZ0S vWyfD3vWkcU/n7fnXlw6/EUfRTPVfJCJQ3t+XHEM9IHgxwFN76SfyXGKrr/6rAGuefS6 rCrLNxnKtYm8SMpPeEFPGDwvXvCZdD5qweQMdZcuDOB1SmWYFeOX6jUKvFxHoanIv0am BpKg== 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 s19si3463911pgm.291.2019.07.10.16.17.21; Wed, 10 Jul 2019 16:17:39 -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 S1727796AbfGJXPp (ORCPT + 99 others); Wed, 10 Jul 2019 19:15:45 -0400 Received: from mga01.intel.com ([192.55.52.88]:6112 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727220AbfGJXPo (ORCPT ); Wed, 10 Jul 2019 19:15:44 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jul 2019 16:15:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,476,1557212400"; d="scan'208";a="159901023" Received: from teutenbb-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.50.108]) by orsmga008.jf.intel.com with ESMTP; 10 Jul 2019 16:15:39 -0700 Date: Thu, 11 Jul 2019 02:15:38 +0300 From: Jarkko Sakkinen To: "Xing, Cedric" Cc: linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org, akpm@linux-foundation.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, serge.ayoun@intel.com, shay.katz-zamir@intel.com, haitao.huang@intel.com, kai.svahn@intel.com, kai.huang@intel.com Subject: Re: [RFC PATCH v2 0/3] An alternative __vdso_sgx_enter_enclave() to allow enclave/host parameter passing using untrusted stack Message-ID: <20190710231538.dkc7tyeyvns53737@linux.intel.com> References: <20190424062623.4345-1-cedric.xing@intel.com> <20190710111719.nnoedfo4wvbfghq7@linux.intel.com> <686e47d2-f45c-6828-39d1-48374925de6c@intel.com> <20190710224628.epjxwlpqqxdurmzo@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190710224628.epjxwlpqqxdurmzo@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 11, 2019 at 01:46:28AM +0300, Jarkko Sakkinen wrote: > On Wed, Jul 10, 2019 at 11:08:37AM -0700, Xing, Cedric wrote: > > > With these conclusions I think the current vDSO API is sufficient for > > > Linux. > > > > The new vDSO API is to support data exchange on stack. It has nothing to do > > with debugging. BTW, the community has closed on this. > > And how that is useful? > > > The CFI directives are for stack unwinding. They don't affect what the code > > does so you can just treat them as NOPs if you don't understand what they > > do. However, they are useful to not only debuggers but also exception > > handling code. libunwind also has a setjmp()/longjmp() implementation based > > on CFI directives. > > Of course I won't merge code of which usefulness I don't understand. I re-read the cover letter [1] because it usually is the place to "pitch" a feature. It fails to address two things: 1. How and in what circumstances is an untrusted stack is a better vessel for handling exceptions than the register based approach that we already have? 2. How is it simpler approach? There is a strong claim of simplicity and convenience without anything backing it. 3. Why we need both register and stack based approach co-exist? I'd go with one approach for a new API without any legacy whatsoever. This really needs a better pitch before we can consider doing anything to it. Also, in [2] there is talk about the next revision. Maybe the way go forward is to address the three issues I found in the cover letter and fix whatever needed to be fixed in the actual patches? [1] https://lkml.org/lkml/2019/4/24/84 [2] https://lkml.org/lkml/2019/4/25/1170 /Jarkko