Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3973365imu; Tue, 18 Dec 2018 07:10:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/WK7iPxO95aVGwZC+T9Rq7v2AMvRXH3FM9rWkY+EcYqoZCI/M+MEjETuzpItIA0dWSTdkyO X-Received: by 2002:a17:902:f091:: with SMTP id go17mr17153674plb.235.1545145847799; Tue, 18 Dec 2018 07:10:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545145847; cv=none; d=google.com; s=arc-20160816; b=puGzI4wjalVzW3pfsrT6jf3UQaWSD3sPW65khc7L7GI/RX7iX76s8DxndWi/GVoQ3l MdS+AlT0zgEmQjxKRz/jGlELjfBRaO0ZDoh0LneDpdY1nOlKi9Zi8DxB4N5PGhpbGhBw zXMk5GcKJj5+8yqQawBmz1Mn/52OmN5NQmavUdE5VtpoKGeE4+Dg4VSRmCrgAoYi6e3B GAHJ33CiyRyqKBoUGeYNrprbDvmAXUVzHfhoOODNwpupyaEy7U/kdfW6fMyLBZ1KdAbY kgFh7QVdf9F5pHKbN7XhjSlEwSleEuMDqRY2toyswDTQLNa7sgyFi1xilDcQUzVM4V06 qHpQ== 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=7+RG+ITuqaopXiIU0SbwfC7VFG6GcTby9yfljyTZRXE=; b=qzzUqdxVDHBGrkAEfBBJs7SW0GIS4CSuTtt8nGEsW00Ejx2LIxsu5eISFIuMItJQHv ILoOrCW9O/FPzvnnhAdspk79zuBRsQ7l3ZI3543wSz2wpI/IjbDFXo4+umAiMYz/UFyJ zOG3gvgzy8kCXPKrIr3/XTmA8Cx3u2aAfW8PWuDXLajqFB/I/KqrDrIm4mxGB1tuhsLr BUzuAW8FIvXDvazQ/otDWjTMY7VHHeFz/DJnKFQ5F1XoZL3Cr8l1ulNFvVkcEY5RdXJ1 R7JkZpupbBaGunXcgSyGPDX6VLWxaeQbCb4sEnvl7TIju3fSW3cJEDC2E5w6llFST44P 3OYA== 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 t65si14071243pfb.247.2018.12.18.07.10.30; Tue, 18 Dec 2018 07:10:47 -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 S1726798AbeLRPIQ (ORCPT + 99 others); Tue, 18 Dec 2018 10:08:16 -0500 Received: from mga12.intel.com ([192.55.52.136]:22909 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726426AbeLRPIQ (ORCPT ); Tue, 18 Dec 2018 10:08:16 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2018 07:08:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,368,1539673200"; d="scan'208";a="284574208" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.154]) by orsmga005.jf.intel.com with ESMTP; 18 Dec 2018 07:08:15 -0800 Date: Tue, 18 Dec 2018 07:08:15 -0800 From: Sean Christopherson To: Jarkko Sakkinen 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: <20181218150815.GB28326@linux.intel.com> References: <20181214215729.4221-1-sean.j.christopherson@intel.com> <20181218041815.GA5097@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181218041815.GA5097@linux.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 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