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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00B77C38145 for ; Fri, 2 Sep 2022 00:03:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234693AbiIBAD2 (ORCPT ); Thu, 1 Sep 2022 20:03:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230151AbiIBADZ (ORCPT ); Thu, 1 Sep 2022 20:03:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DABF26F250; Thu, 1 Sep 2022 17:03:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7915B61EE2; Fri, 2 Sep 2022 00:03:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89BDCC433C1; Fri, 2 Sep 2022 00:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662077003; bh=J28V6MUQi5avbgUtRQ61aXc/y67aKX5IwS+L29//y3g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FWivmOhIMyWTb6oPNyHr/ZsOUkWKlj6WpSmjXSr4av9daW1o3Qo7wSaJ7Y2lFNecJ oVjuT7WnptjS91QEpRAVcF0miPyJqrmSEWChvzW0U0JtBuUX9/B+wEVv0J4jtNKLMw Nxnh8WIrAcUKw0e2gxfrxswOjOhUtSC7vkGSqjuv1c/NwsQCEyXP78FLTb0aUKHQIg AlJfeGHy2YydMBnbZvQ6rAQEthgyWAJLGb8o1W0ms4P6jmCZIDdh3yLk7P+Anteajs CZhFVj00fX2G7STBhtqPpTEtsqMYdGnT76cwxK3wY8YCN/IuiEx+11/L3qE31cpv25 HdKNFAypCH5bg== Date: Fri, 2 Sep 2022 03:03:19 +0300 From: Jarkko Sakkinen To: Reinette Chatre Cc: linux-sgx@vger.kernel.org, Haitao Huang , Vijay Dhanraj , Dave Hansen , Paul Menzel , Shuah Khan , "open list:KERNEL SELFTEST FRAMEWORK" , open list Subject: Re: [PATCH v2 4/6] selftests/sgx: Add SGX selftest augment_via_eaccept_long Message-ID: References: <20220831173829.126661-1-jarkko@kernel.org> <20220831173829.126661-5-jarkko@kernel.org> <17dcb776-14b8-f673-1f36-8f22b192eadb@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17dcb776-14b8-f673-1f36-8f22b192eadb@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org On Thu, Sep 01, 2022 at 04:12:22PM -0700, Reinette Chatre wrote: > Hi Jarkko, > > On 9/1/2022 3:22 PM, Jarkko Sakkinen wrote: > > On Wed, Aug 31, 2022 at 01:07:35PM -0700, Reinette Chatre wrote: > >> On 8/31/2022 10:38 AM, Jarkko Sakkinen wrote: > > ... > > >>> tools/testing/selftests/sgx/load.c | 5 +- > >>> tools/testing/selftests/sgx/main.c | 143 +++++++++++++++++++++++++---- > >>> tools/testing/selftests/sgx/main.h | 3 +- > >> > >> Is this test passing on your system? This version is missing the change to > >> mrenclave_ecreate() that causes SGX_IOC_ENCLAVE_INIT to fail when I try it out. > > > > I *did* get a pass in my test machine. Hmm... I'll check if > > the kernel tree was out-of-sync, which could be the reason. > > > > I do not compile kernel on that machine but have the kernel > > tree for running selftests. So there is a possiblity for > > a human error. Thanks for pointing this out. > > On my system I encounter the failure below (V1 of this series > did not have this problem): > > [SNIP] > ok 11 enclave.augment_via_eaccept > # RUN enclave.augment_via_eaccept_long ... > SGX_IOC_ENCLAVE_INIT failed: Operation not permitted > # main.c:236:augment_via_eaccept_long:0x0000000000000000 0x0000000000002000 0x03 > # main.c:236:augment_via_eaccept_long:0x0000000000002000 0x0000000000001000 0x05 > # main.c:236:augment_via_eaccept_long:0x0000000000003000 0x0000000000006000 0x03 > # main.c:236:augment_via_eaccept_long:0x0000000000009000 0x0000000000001000 0x03 > # main.c:251:augment_via_eaccept_long:Failed to initialize the test enclave. > # main.c:1260:augment_via_eaccept_long:Expected 0 (0) != setup_test_encl(ENCL_HEAP_SIZE_DEFAULT, &self->encl, _metadata, EDMM_SIZE_LONG) (0) > # augment_via_eaccept_long: Test terminated by assertion > # FAIL enclave.augment_via_eaccept_long > not ok 12 enclave.augment_via_eaccept_long > [SNIP] > > ... > > >>> > >>> static const uint64_t MAGIC = 0x1122334455667788ULL; > >>> static const uint64_t MAGIC2 = 0x8877665544332211ULL; > >>> +/* Message-ID: */ > >>> +static const uint64_t EDMM_SIZE_LONG = 8L * 1024L * 1024L * 1024L; > >>> +static const uint64_t TIMEOUT_LONG = 900; /* seconds */ > >>> + > >> > >> Apologies if my feedback was vague - I actually think that the comments in V1 added > >> valuable information, it was just the variation in formatting that was distracting. > > > > IMHO message ID is pretty good reference. Can you > > propose how would you redo it to minimize the number > > of iterations in the series? > > The message ID is a good reference but it points to an email thread > and as used here it is unclear what part of that thread is referred to. > What you had in V1 was very helpful so it could be: > > /* > * The size was chosen based on a bug report: > * Message-ID: > */ > > I am not sure about Message-ID vs url. The latter may be more > convenient since the user needs to first search which inbox the message-ID belongs > to before the message can be accessed. Not a big deal though so I think > either works. This is definitely better, I'll use it. Thanks. > > Reinette BR, Jarkko