Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1265556rwe; Thu, 1 Sep 2022 15:41:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR6GiAwGBjoqSZT6mcelFY4IdpRcs61Sbux3j7F+iLc5xcSFMw/JG/sY6JhEz/pu0tzLNoQG X-Received: by 2002:a05:6402:90a:b0:443:8b10:bcad with SMTP id g10-20020a056402090a00b004438b10bcadmr30876430edz.416.1662072060438; Thu, 01 Sep 2022 15:41:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662072060; cv=none; d=google.com; s=arc-20160816; b=bL1zd96MM8M6XJofEPKqwZqvTfzFbaeGS5VS2ttMZhpUk/MMNect0ITgJVGSnRxBjg 5Ge8KkItdMlhpnSjocpa7j/NcBQW9KBRHDypv8wNEMj55rALgh/r4MneHsFWolngNGpt OymSwG248egG8xeSpX1/VwueQrLYRmljiI4EkTUfM0GH5SoDchtXNTu87xNCwsZdhogH ZkraBc/yUkculAx0pCzQ4pco8cWhoiy58+T/gJEXLqT0sj2iLrnRv8l0jL6Mw8GAFHsj QTSBZFKyr5DgmOBwEfJ7dRobHrEzzrFHUa4J+Q9vKSsQX5IZKfOBCUkYf/qkuAzqAK7P eoGQ== 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=6i62JMXP9URglUj+TVdr4q1dnL5/xnbn/HbbsNVM7yc=; b=WNSh58GEIxGRIlElVrHZDsQ/jCN81P3hpnLZzNNAbWRm9eoW3PhXHaoEvVpYCQhl9j 4pWr8FOpZuqnAJYYA8Bv3kQMgCPU/GpatH79YjKFHq+Q6E1S2Nvb1Tt3KknbVvSskmjE biru+y2oghh7P52O2mOn5gO0pihvM2f1dYvuHbrLh2pUDfvTra//2LJMlYDZ+l1MoMD0 9ABYSSvYg8fu1lcrChFU4KRMyFuOdGv/Pm8mMVVD6CMnBAlfLab6CqxLHmPVAeAh+3+Z IJ0FDIZij4xxagS01iJORZv7HISpEWC+dRxHR/b+AjVwXJdLGR7QjDTS1RqU25tyUDuo OMlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="BRA5/HQd"; 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 hp5-20020a1709073e0500b00741521e9a46si487918ejc.588.2022.09.01.15.40.35; Thu, 01 Sep 2022 15:41:00 -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="BRA5/HQd"; 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 S235215AbiIAW2R (ORCPT + 99 others); Thu, 1 Sep 2022 18:28:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231936AbiIAW1q (ORCPT ); Thu, 1 Sep 2022 18:27:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B22847199D; Thu, 1 Sep 2022 15:25:37 -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 ams.source.kernel.org (Postfix) with ESMTPS id 121C7B8293A; Thu, 1 Sep 2022 22:24:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A03BC433D6; Thu, 1 Sep 2022 22:24:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662071049; bh=Hm8DwC0GrmApv2fYWEKeBc4h9nbEKqLf6rw3zQeK5LE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BRA5/HQdm95Mz2LfUa1n1wgpWrWr62tXwr21FmiNChxR3dk+tR7La0ns1/+OmLFH3 qDj402hH2s4HI487xv3vXDtSJvUF/ZV8nazEmw8XomiGMfM37tsQCfkixZ5zI61FqN 5y/11INJwlGfRNus2snrc8q2AfxMr9jaX29i1ctdJbbKzHyzwHOzOnOikY0HsMLFJY 2MohBNhBbATg+1QniClgBEJB+K3wvaTdj86gwW+9Igs718Q21dBhrwIdeJbD3Xq818 p01Pywux+4/9M02DGDd1MgVxBvorbC+omZMb/Avmx0t3/ABylTHV3Z39qAjD5kZvU8 pR3cnmCaM+WWQ== Date: Fri, 2 Sep 2022 01:24:04 +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 , "open list:KERNEL SELFTEST FRAMEWORK" Subject: Re: [PATCH v2 6/6] selftests/sgx: Add a bpftrace script for tracking allocation errors Message-ID: References: <20220831173829.126661-1-jarkko@kernel.org> <20220831173829.126661-7-jarkko@kernel.org> <048cdd4c-0454-1fb2-ebac-3bdb4cde792b@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <048cdd4c-0454-1fb2-ebac-3bdb4cde792b@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 Wed, Aug 31, 2022 at 01:09:21PM -0700, Reinette Chatre wrote: > Hi Jarkko, > > On 8/31/2022 10:38 AM, Jarkko Sakkinen wrote: > > Signed-off-by: Jarkko Sakkinen > > --- > > v2: > > * Added comments. > > --- > > tools/testing/selftests/sgx/alloc-error.bt | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > create mode 100644 tools/testing/selftests/sgx/alloc-error.bt > > > > diff --git a/tools/testing/selftests/sgx/alloc-error.bt b/tools/testing/selftests/sgx/alloc-error.bt > > new file mode 100644 > > index 000000000000..0cc8b2e41852 > > --- /dev/null > > +++ b/tools/testing/selftests/sgx/alloc-error.bt > > @@ -0,0 +1,9 @@ > > +/* EPC allocation */ > > +kr:sgx_alloc_epc_page /(uint64)retval >= (uint64)(-4095)/ { > > + printf("sgx_alloc_epc_page: retval=%d\n", (int64)retval); > > +} > > + > > +/* kzalloc for struct sgx_encl_page */ > > +kr:sgx_encl_page_alloc /(uint64)retval >= (uint64)(-4095)/ { > > + printf("sgx_encl_page_alloc: retval=%d\n", (int64)retval); > > +} > > I did see you response in [1]. I continue to find this > addition very cryptic in that it assumes global familiarity > with BPF scripting which I do not think can be assumed. I > still think this script can benefit from a comment to describe > what the script does and how to use it. I think I follow Dave's advice to use perf here. I'll make a header which explains what the script does. BR, Jarkko