Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3413425imu; Mon, 17 Dec 2018 20:19:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/V/krdgKcKun+gHnMEkvXwI/gpunuuR+OAgLhFGXUzAhYXPKV9rIBv3ZezV2oiLRGCWJDi+ X-Received: by 2002:a63:9809:: with SMTP id q9mr1585931pgd.109.1545106776524; Mon, 17 Dec 2018 20:19:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545106776; cv=none; d=google.com; s=arc-20160816; b=JRv+VvVlgzZZ10p4MkjtEOKEivn0bismmgNuHLTMFpFsIeBK/+fYA9aBtKO/PmEPcZ ccWMhk7Z6Co0Amw0K5AxverxQglTAoPSBOMlvUS3VPjQkSU2jf9csq42RyBqALKuZ6LJ MEqsr3Qj0/HDDEy6NjkEn6qUTIBS57XjCkf6WkMzE6a212hP6WHMYpNixfcV0j0pRmG+ vpF+r9W3nrOnOKUPpJMZHPaMlaw9FfRDOqCf3IKMDaSSAmnmEPZ6n92gWvhzbnpwUjAq 0AYav+wrKV8pAAM5eB6nPRdilndHcDLMXDsfIpY/xp5rwar0+kbGOdOCr09SR5vr3m7J bRVg== 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=ng8qKEbZMZ2Suj6WlmqJC4z2gm7eCxxk4BQHlIriyaM=; b=qLGSgMqTx3af92qSFEVS50oOULNCfHEI8qiXUPmJGPRwXEOOq6ZnNR5TE4zC1qL1+w 3P5BT4L5m+p+pfXsRCRNhLTKxgyZMPayFBcnGlfQaM+GP1YIgH7t3ntnvuVn0TRe0yFo 43+C8TWsSmw5L0zODHi5uk846RTsiAIFppAl++YzirIDE6By9/NQP1wYWYS0+tZ6vXsi diKDSzAfZbiRnimXZ+gi4lZGDm5yF7zlKz8v7zkL2Y4TwYpKyZ9EpmUjmaBfPOBDqkxr pNMYXIx48yxd/ezYD9r7XDG5h30rtE1+q/DCWuJO8ZJIUwOsRH6h+CNuquS5W7hMxe33 UNUQ== 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 x8si11803207pll.187.2018.12.17.20.19.18; Mon, 17 Dec 2018 20:19:36 -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 S1726481AbeLRESY (ORCPT + 99 others); Mon, 17 Dec 2018 23:18:24 -0500 Received: from mga04.intel.com ([192.55.52.120]:65095 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726296AbeLRESY (ORCPT ); Mon, 17 Dec 2018 23:18:24 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Dec 2018 20:18:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,367,1539673200"; d="scan'208";a="304671402" Received: from zhangxi4-mobl5.ccr.corp.intel.com (HELO localhost) ([10.249.254.207]) by fmsmga005.fm.intel.com with ESMTP; 17 Dec 2018 20:18:16 -0800 Date: Tue, 18 Dec 2018 06:18:15 +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: <20181218041815.GA5097@linux.intel.com> References: <20181214215729.4221-1-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181214215729.4221-1-sean.j.christopherson@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 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? /Jarkko