Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1358098rwe; Thu, 1 Sep 2022 17:37:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR7SckcZXfhuEfdOVUHjpHiU5Ttv0boJH42ztmw8PKXp9PIp3CLm+doJvVw+p17FIK9n82pI X-Received: by 2002:a17:902:d294:b0:175:33a8:c60e with SMTP id t20-20020a170902d29400b0017533a8c60emr12975110plc.79.1662079070986; Thu, 01 Sep 2022 17:37:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662079070; cv=none; d=google.com; s=arc-20160816; b=xS+oxb/1E6mrYcYGaia+cstg5K3428qH9SWK3tIsX26lNsNEjY9ep+2LtMy3bYQ37F QACPltivmjs2Y7n6b4MpzajayTGMgXSSgGtm1g94okHhrolDcn7ZPE1kYSwHHGGwOzr6 z4pELlS5t7N0Jf7zIkC/2vmey/7hzjnVLrUKcJu8A3k7D5w66K95CyLM2moEEQe2mNeI WPnh4RjBr5qBVb/wuMwVqHaKMMsVYd39rpnPWNOY8XYHWDItBgqG4E4OkeHCc91fjZ7c Gv9zHCv3zy09YILYe34hMeb6yUCegvc5ds03ptXoEqwCeYRyE/Tdk0JX3T/qBVVw0eLX W/Fg== 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=ZtmzL96j/3BNVtCj3iCCzsFpcf9dXufcIfOiYbno8bs=; b=ikHNTvW9gwrjuGFqZ2+pkAVmFD0Y5QAVONvfNfZW5MBl+HNcCuGccIQ1d/6J09sIR1 2d+dQtY9yjrQ63F90fG+6ZEzCZAGbO5vneuCmRK2Q8ra3058r9sZISr2k9SkAP/V9zm0 EnRjf6Dc23FjEQ3uqUgVSTyJrkcFTJk+xaOGKjk/hEBvpodbriGUUQbxeOSe/Pr88z7Y zlduLfxTSxb7RcErP0MRLnROmRJ40Q9MFdaBB0fre8klDNgCnoYNbOFReKO5H2rfKvGo 2r5c20r/SGUYTa5XO5toRESfBGT78ZO6zd840DyNh08L81D7H8TZ8/OInMsLnLx46N7r l1pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FWivmOhI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020a17090332d000b001754bd1f7dasi636682plr.194.2022.09.01.17.37.38; Thu, 01 Sep 2022 17:37:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FWivmOhI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234727AbiIBADa (ORCPT + 99 others); Thu, 1 Sep 2022 20:03:30 -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> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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