From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76491C43444 for ; Wed, 19 Dec 2018 05:04:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5167E21871 for ; Wed, 19 Dec 2018 05:04:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727629AbeLSFD7 (ORCPT ); Wed, 19 Dec 2018 00:03:59 -0500 Received: from mga05.intel.com ([192.55.52.43]:1344 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726897AbeLSFD6 (ORCPT ); Wed, 19 Dec 2018 00:03:58 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2018 21:03:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,371,1539673200"; d="scan'208";a="119984542" Received: from cqinghon-mobl2.ccr.corp.intel.com (HELO localhost) ([10.249.254.218]) by orsmga001.jf.intel.com with ESMTP; 18 Dec 2018 21:03:52 -0800 Date: Wed, 19 Dec 2018 07:03:51 +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: <20181219050351.GD14295@linux.intel.com> References: <20181214215729.4221-1-sean.j.christopherson@intel.com> <20181218041815.GA5097@linux.intel.com> <20181218150815.GB28326@linux.intel.com> <20181219044346.GA14295@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181219044346.GA14295@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 Wed, Dec 19, 2018 at 06:43:46AM +0200, Jarkko Sakkinen wrote: > 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. Might make sense to summarize the design decisions for future patch set versions to the cover letter at least, namely the reasoning why not to follow the ABI. /Jarkko