Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4693153imu; Tue, 18 Dec 2018 21:24:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/W/wUdFb+PsDMDgxBNmj/sYxUygWgXOV0E7Wv+FfLO3IvVT1UN08HGMQRVdsc62sWlusZf6 X-Received: by 2002:a63:cc4e:: with SMTP id q14mr18025299pgi.291.1545197083826; Tue, 18 Dec 2018 21:24:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545197083; cv=none; d=google.com; s=arc-20160816; b=JihE3dBJdlQdleOpOahgElXwCvsn0N6Jrcfb1gO5vQDvbDlvvZy2V896C4TW7sMW3i PC7cwateeaB5WM9Lu8+X5r+ODWqtzmImYJz6N37Tl9pNBtQU82BlirpfwT624yJAcnk+ 6kl196bLDIc2+oa7awbj/Mp/UkLgCkKPJQPUBk4XfFoMBy1aWw9FcDCOb8/bdq6h89jd qDF1dVtkDkM308kAxn73QU708fOLP96P5s8aqDY20J/+cwKriEDeEykfKv6Mafbqs9Az U8JHS758HDEMXASTbGrsowh2A6exufz+EyEbGusmI7/8Cl5TwonB4mB8LiTJQvn/QH8g x5Xw== 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=4htBD1gl5TL259KO9EoQiNzhPYWONQhNpBaT9gH/3x8=; b=QkawZWoGB5fhENcjhZcGdgVF2WDCB0o1birPOU4K2EFpPMml1tdYwcRItBiL9q60V1 lcWLC+vFoGELv4XzVoRfmqxrxfHJKdzRhYm13DskxeIQ6nXQZLSt8thhPOZk7CTvfUJy o1dUtHWV6M86/PwDSvSIDM2TNUSZMbK2NlX2FG9sBBul/r6lseePlqqOr5Fe+KL45Psi 40nGzPQ2QdcQi7J2BBDmRXANsMFK1c753k7ljLPiLN44tKFKqnWeKaRvQFwTeH5yah2U nb09arp+eGThZ5xVl/9NLVxJ8lpTiSCzpHVqbbfKI/GgkMN+ueP48W2qxaLn+N81K9Cc vvkA== 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 y17si6989139pll.10.2018.12.18.21.24.26; Tue, 18 Dec 2018 21:24:43 -0800 (PST) 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 S1727394AbeLSEnw (ORCPT + 99 others); Tue, 18 Dec 2018 23:43:52 -0500 Received: from mga12.intel.com ([192.55.52.136]:31200 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726993AbeLSEnw (ORCPT ); Tue, 18 Dec 2018 23:43:52 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2018 20:43:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,371,1539673200"; d="scan'208";a="108479202" Received: from cqinghon-mobl2.ccr.corp.intel.com (HELO localhost) ([10.249.254.218]) by fmsmga007.fm.intel.com with ESMTP; 18 Dec 2018 20:43:47 -0800 Date: Wed, 19 Dec 2018 06:43:46 +0200 From: Jarkko Sakkinen To: Sean Christopherson Cc: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Dave Hansen , Peter Zijlstra , "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org, Andy Lutomirski , Josh Triplett , Haitao Huang , Jethro Beekman , "Dr . Greg Wettstein" Subject: Re: [RFC PATCH v5 0/5] x86: Add vDSO exception fixup for SGX Message-ID: <20181219044346.GA14295@linux.intel.com> References: <20181214215729.4221-1-sean.j.christopherson@intel.com> <20181218041815.GA5097@linux.intel.com> <20181218150815.GB28326@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181218150815.GB28326@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 18, 2018 at 07:08:15AM -0800, Sean Christopherson wrote: > On Tue, Dec 18, 2018 at 06:18:15AM +0200, Jarkko Sakkinen wrote: > > On Fri, Dec 14, 2018 at 01:57:24PM -0800, Sean Christopherson wrote: > > > __vdso_sgx_enter_enclave() gets another rewrite, this time to strip > > > it down to the bare minimum and explicitly break compliance with the > > > x86-64 ABI. Feedback from v4 revealed that __vdso_sgx_enter_enclave() > > > would need to save (a lot) more than just the non-volatile GPRs to be > > > compliant with the x86-64 ABI, at which point breaking from the ABI > > > completely became much more palatable. > > > > > > The non-standard ABI also solves the question of "which GPRs should be > > > marshalled to/from the enclave" by getting out of the way entirely and > > > letting userspace have free reign (except for RSP, which has a big ol' > > > DO NOT TOUCH sign on it). > > > > Can you share a reference, or is this better documented in the > > accompanied patches? > > Patch 5/5 has more details, and v4 of the series has a lot of background > info by way of discussion: > > https://lkml.kernel.org/r/20181213213135.12913-1-sean.j.christopherson@intel.com Thanks Sean, I will. Have not had yet much time to look at this. /Jarkko