Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp927566pxk; Fri, 25 Sep 2020 01:18:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUFFae9vhn/hJAR6ErmhqljRNvWr31IIA88Ez84h8iaXdmH64AV3yPXiO2Quyvub2EbHKE X-Received: by 2002:a17:906:4993:: with SMTP id p19mr1608378eju.277.1601021888428; Fri, 25 Sep 2020 01:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601021888; cv=none; d=google.com; s=arc-20160816; b=J6rj+8mbOOMi4YMze5v04uK2or2jim3jNPJQmnLrRYUE0V0vNtSOGqNhFo9DIwaMo8 FA5u9mMjcgIWMSEygHQm6FlSoCA3AzhbUXXuU+LLYKeD6rJ2jhqT0etT4VK8lOMoCuDx 399N2CcXQPrhAiEBmoJDIUIPSVDHIZlS5mi60gJqs6tCaGhfE9m5ceOu2Q6CmcyGp+5k dSug+4kIqqx+twYhGLkRkd6x2D6WQJad5dYJDRj2p8ry2tdwqninUyRqf2yrR5RcD7PP D/E9LHWSakQDFCw5GuIKXm4TY0PpVolxiyD/WaFiUPO4o6k/ed04IXyfZlOnkPBR2mia d9vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=l/7weiyqiOxGuxBi5YYNdPQ1UkPqzVdGX8jds3f4aHU=; b=ToLEIkLWqO2UFEaWu3ZyECGG7aXTfUdj0rH1o1ZTPRXUCZBLYy4kVmUHHNQZ2GqqVM A55Rh3y7SkfJxbLkeoJMm9mgkuJo0gx3d/0ag8Hsf9KO3CIUIiGyTxZBGer57QmJWmik Z2RyI1MxJ7yWzVHI0lIZs8i13IAWJmZs6+caBoWRy4weEE1akHRSC2BlbzPNh7/8aXgm PuOCAimScTdJLXv/XW13bsbALr+NM3qCjWUQ0Mm0gg4Rf9xrboTlFtHwCDB09bVmrEpP Kxh5hmq9NyUQPdAWWZpkmtIDjUTuqEUd4uaab8FIbpgduOTSLr+tmFxI3drCZWhJk+o7 90xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=hIz+becV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si1336288edr.259.2020.09.25.01.17.45; Fri, 25 Sep 2020 01:18:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=hIz+becV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727346AbgIYIOu (ORCPT + 99 others); Fri, 25 Sep 2020 04:14:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727063AbgIYIOu (ORCPT ); Fri, 25 Sep 2020 04:14:50 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0348DC0613CE; Fri, 25 Sep 2020 01:14:50 -0700 (PDT) Received: from zn.tnic (p200300ec2f0b3a00d3756fc4b2470eaa.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:3a00:d375:6fc4:b247:eaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 7C8B91EC0430; Fri, 25 Sep 2020 10:14:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1601021688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=l/7weiyqiOxGuxBi5YYNdPQ1UkPqzVdGX8jds3f4aHU=; b=hIz+becVe0bb8xhSBZkt0t5O7MB7U27xkGBj7Hq9JnjdzPfTfJPvLLa/0KrNu6Dhgt8zTL 7akzFZ7IevVYudSVDYJiJqq+aN9iF1XgYpb1Th4sOM9KRX4JVCpxFnLaYEpkxYw4L/Ctmu YHR1T5mUhIoOiL7nHgIOGH/zzUzE/bY= Date: Fri, 25 Sep 2020 10:14:41 +0200 From: Borislav Petkov To: Sean Christopherson Cc: Jarkko Sakkinen , x86@kernel.org, linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski , Jethro Beekman , Cedric Xing , akpm@linux-foundation.org, andriy.shevchenko@linux.intel.com, asapek@google.com, chenalexchen@google.com, conradparker@google.com, cyhanish@google.com, dave.hansen@intel.com, haitao.huang@intel.com, josh@joshtriplett.org, kai.huang@intel.com, kai.svahn@intel.com, kmoy@google.com, ludloff@google.com, luto@kernel.org, nhorman@redhat.com, npmccallum@redhat.com, puiterwijk@redhat.com, rientjes@google.com, tglx@linutronix.de, yaozhangx@google.com Subject: Re: [PATCH v38 21/24] x86/vdso: Implement a vDSO for Intel SGX enclave call Message-ID: <20200925081441.GF16872@zn.tnic> References: <20200915112842.897265-1-jarkko.sakkinen@linux.intel.com> <20200915112842.897265-22-jarkko.sakkinen@linux.intel.com> <20200924180407.GO5030@zn.tnic> <20200925003808.GB20333@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200925003808.GB20333@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 24, 2020 at 05:38:10PM -0700, Sean Christopherson wrote: > > Why not simply > > > > arch/x86/entry/vdso/sgx.S > > > > ? > > I really like typing? I'll say. > Yes, to call out that there's a field there, but a field that the vDSO should > never touch. You wanna enforce that in the vdso code? Because if it is there, luserspace will touch it. > > > +#define SGX_ENCLAVE_RUN_EXCEPTION 4*8 > > > + > > > +#define SGX_SYNCHRONOUS_EXIT 0 > > > +#define SGX_EXCEPTION_EXIT 1 > > > > Those are in ...uapi/asm/sgx.h too. Unify? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ What about this here? > > Are the CFI annotations for userspace? > > Yes, though that's a 90% confident "yes". Looks like we wanna support it: f24f91088427 ("x86/vdso: Define BUILD_VDSO while building and emit .eh_frame in asm") > Argh, it's actually supposed to be TCS, SGX_ENCLAVE_RUN_TSC is the one that's > wrong. Whoopsie :-) Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette