Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp794623ybg; Wed, 10 Jun 2020 14:02:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLRyx0HnycW6yvq+cZeMccDYxAP3BzOJ/kFXnu7aWshOPy4AQqt4vEOTXjjR2OX1YnXiTi X-Received: by 2002:a17:906:f189:: with SMTP id gs9mr5065709ejb.203.1591822928704; Wed, 10 Jun 2020 14:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591822928; cv=none; d=google.com; s=arc-20160816; b=IOUxjspG6AqEoJBMP0aMsY6EtMN94k04T27t3A917PTpOjfKpBkTY7QKULvx6YLApQ Z+5yQ1EqNu/WEgC/R67sT3rzCK0/otQ9mf5FPQvEytQTWTtHKN0R/Pwljo8gOUz+qtJE gvmSrp+EEoQpczrN8bMT2kt2BuBNmIhmWimLjOQJ8XVA6Q7+l2of/h5H633X56AT4kXj KBFj4lT5T8fyAvyb+owKqI7upyX3AYk8IOY0B16m+N5Q5jriuO30pj1v7Au48tKZgcRC ObEqvU2YYU+Pr5vf4mELU45EyguqcJmcHAYMYM+duPQsP6sITthdZPcnbm+bVfhToc4/ O1hw== 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:ironport-sdr:ironport-sdr; bh=jMJjbZ7e1fFSe0b3FkY2zy59ev9T0ETnKwpBgMcYKrk=; b=x/VUaWJC16+XlJ+NugCOfilaaeZqOPfbX95gTRhhGXEBN+MnnqI1/fSRaGYnFqaCiF efuEIZwlfXOF9U7VVOgXRVA5VuZl371tQlbzXzwp3YIxPhs9IWQAOZkrpsGl1PpQAnzJ WYAx/rjkCuw8g/d5OwxBJ0IOJ3eQrXGgZ4nhmIxAJaoKmM68HqLk2oXn4xIjeyeaZjvn NZB/mqoJxt4gG0oDsUe0xC+4h7Laq91q/eUypFnrhAfApeGT1DSUHYyMca5OD39Pavdb cHywGo/a27ec0Sw7DHlnMkwkrv3ZFowxARMgyFHIogFttOUM/z8r0beueUqZV6y76u7O zAHw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d4si644521ejw.326.2020.06.10.14.01.46; Wed, 10 Jun 2020 14:02: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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726977AbgFJU7G (ORCPT + 99 others); Wed, 10 Jun 2020 16:59:06 -0400 Received: from mga04.intel.com ([192.55.52.120]:4960 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726893AbgFJU7F (ORCPT ); Wed, 10 Jun 2020 16:59:05 -0400 IronPort-SDR: WxA5p+uoDmJ4VbcbauXeav2YNxWknxvvaDV3hwkoVig2EQ7jrnddJ/iNA/+K3jMwtDscNtbOfF 3+WWzun7nn4A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2020 13:59:05 -0700 IronPort-SDR: /gWmaGFNqAeq/bzL2INUDgjRonw+XaBkidyl7xPn2/YlxAIu2XcIOhW96YY0r+CzZeyK0a0yhH shT4W2sQryag== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,497,1583222400"; d="scan'208";a="473566824" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.152]) by fmsmga005.fm.intel.com with ESMTP; 10 Jun 2020 13:59:04 -0700 Date: Wed, 10 Jun 2020 13:59:03 -0700 From: Sean Christopherson To: Jarkko Sakkinen Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org, akpm@linux-foundation.org, andriy.shevchenko@linux.intel.com, asapek@google.com, bp@alien8.de, cedric.xing@intel.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 v32 00/21] Intel SGX foundations Message-ID: <20200610205903.GF18790@linux.intel.com> References: <20200601075218.65618-1-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200601075218.65618-1-jarkko.sakkinen@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 Mon, Jun 01, 2020 at 10:51:57AM +0300, Jarkko Sakkinen wrote: > v29: > * The selftest has been moved to selftests/sgx. Because SGX is an execution > environment of its own, it really isn't a great fit with more "standard" > x86 tests. > > The RSA key is now generated on fly and the whole signing process has > been made as part of the enclave loader instead of signing the enclave > during the compilation time. > > Finally, the enclave loader loads now the test enclave directly from its > ELF file, which means that ELF file does not need to be coverted as raw > binary during the build process. Something in the above rework broke the selftest. I'm getting intermittent EINIT failures with SGX_INVALID_SIGNATURE. I'm guessing it's related to the dynamic RSA key generation, e.g. only ~15% of runs fail. Verified that v29 selftest fails and v28 passes. My internal tests also pass, i.e. it's all but guaranteed to be a selftest issue, not a kernel issue. Jarkko, I don't have bandwidth to dig into this right now, hopefully this reproduces in your environment. Let me know if that's not the case.