Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp75596imu; Mon, 10 Dec 2018 16:28:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/WFCf/Py/S1nP5HsGoIZA5gxqP6WqPkJAWl1Kerrf9jSoOTPhPWXbTmxr32ilVDWgyuUCQq X-Received: by 2002:aa7:8045:: with SMTP id y5mr14242434pfm.62.1544488132670; Mon, 10 Dec 2018 16:28:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544488132; cv=none; d=google.com; s=arc-20160816; b=vFR10P+mHriPwThomDWfzODc+/slfMYLInK60IcGE/YycAA61ac5w2iB0V5TS8LJEA uXHF9MmAgDBWsxaOVKMeF17msKpZFZX9nrSFAY/Y0KO1JDaQQZm2a96VvKhpShoqireq mXoNyEOI+8GKGtvmWBbZhOMwzuxlmyb4yltZ4AVjBVykZ9BrGz5T7tMIR46n9e5/ZMEZ EAyJssBtCm48QY/nR9zPStrcXmO63mBTg1cmofDi7q8aID5MJ0UvJ/YphGYib6jkprxm Oz8aU5X71mk07VDToxAp+9VHke5l8DEwcMf2uGlOf0Lotd2y1B/OoCv7+0zdBBd8aeiP 0sSQ== 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=7nXt4AOOpaItXTE24mEBg/MRoyC9Px1hETSq31ZXRoo=; b=vPpNsE25bfG/7+tYRTsl8vArL0o8FCSyWeXMAF9If0G6riGG9VRiUpXJnMXeod9YmE hxE18cVH7N2vLbuwZmlWKszd0n7coAbT/g1L84aQHi85nw7enoGMNVN/fH/vAG66k5gl 4ldsdFDQI2tw2vwNeEGbN/Gp2qffSumNlWH2Hw3fofTWfB/454TjxIbHVSC3Yu4/EfYa tWeKpEuEaSHsWLbS6hLwtZELvbNJK6nYC2Nc+oGy8YGCC1A2u5acpJJm9+dUHN50efe3 nhpR/7y5FdDr9jc32hDmVR0CHt4IV9H2vawZcRcwsntO5sftRhrFQpGGQf40HCAiC5j0 kzDQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6si11241643pfc.57.2018.12.10.16.28.13; Mon, 10 Dec 2018 16:28:52 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729651AbeLJX0S (ORCPT + 99 others); Mon, 10 Dec 2018 18:26:18 -0500 Received: from mslow2.mail.gandi.net ([217.70.178.242]:53594 "EHLO mslow2.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728502AbeLJX0S (ORCPT ); Mon, 10 Dec 2018 18:26:18 -0500 Received: from relay12.mail.gandi.net (unknown [217.70.178.232]) by mslow2.mail.gandi.net (Postfix) with ESMTP id 7FFF63A050E; Tue, 11 Dec 2018 00:25:04 +0100 (CET) Received: from localhost (jfdmzpr03-ext.jf.intel.com [134.134.139.72]) (Authenticated sender: josh@joshtriplett.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 8B254200006; Mon, 10 Dec 2018 23:24:56 +0000 (UTC) Date: Mon, 10 Dec 2018 15:24:50 -0800 From: Josh Triplett To: Sean Christopherson Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Jarkko Sakkinen , Dave Hansen , Andy Lutomirski , Peter Zijlstra , "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org, Andy Lutomirski , Haitao Huang , Jethro Beekman , "Dr . Greg Wettstein" Subject: Re: [RFC PATCH v3 0/4] x86: Add exception fixup for SGX ENCLU Message-ID: <20181210232449.GA11843@localhost> References: <20181210232141.5425-1-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181210232141.5425-1-sean.j.christopherson@intel.com> 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 Mon, Dec 10, 2018 at 03:21:37PM -0800, Sean Christopherson wrote: > At that point I realized it's a hell of a lot easier to simply provide > an IOCTL via /dev/sgx that allows userspace to register a per-process > ENCLU exception handler. At a high level, the basic idea is the same > as the vDSO approach: provide a hardcoded fixup handler for ENCLU and > attempt to fixup select unhandled exceptions that occurred in user code. So, on the one hand, this is *absolutely* much cleaner than the VDSO approach. On the other hand, this is global process state and has some of the same problems as a signal handler as a result.