Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp773582rwe; Wed, 31 Aug 2022 10:42:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR77z41V2ko+wb9fwwJB6yNhLRQKjcXvCyc00bQXxayQWA4nGj+mx1qTOWqtl0SXQrRVut2S X-Received: by 2002:a17:90b:3e81:b0:1fd:8357:cbc8 with SMTP id rj1-20020a17090b3e8100b001fd8357cbc8mr4475915pjb.48.1661967756470; Wed, 31 Aug 2022 10:42:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661967756; cv=none; d=google.com; s=arc-20160816; b=FyHnahMlApSfW9Vo3ri/KWUSFEShggXKJLEmIRP1MU5jhYGebCZv/Jex/TeIBSpQzh Oai46RjFP1v6izCLOaUIhql3AS0XVgNBoszFBbshV9eSdQnzp6LoHgRcjKOuJ6XBacq/ Hu8B3dzkdmUgFlkt7iHex2xKm0wjiDOpS5lZtJI6nzsP3QPfID+BIsdZdBI3z9mewWdw Ss0CThp+mr2RGSXbhKpCua9I96o2HUxZ/ByuKaq6Ok6LK1E8vq/cbocgQLG91vhOxILL eSJ32DVsRBnWWX0L4gJbFHm6pNbaCrTWJwpzN9Iadtt6C6N/20dhcj4WbEV2feNeqs7/ moZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+GsV459CPt/1iUm+N4GlZJq9v1OTi5SVeYJvKtl/kzY=; b=dcd0VZAH54yXON/SoRg0PC6nFV8oc/NbRf2KhQGD+P/Nn/GwcomjmwHeEfHZ+Ba13B mchE6t/MLPKcR5QilwXI0hS9KaRDWEw1cvxWYmgD38SxjP2R6KzfITLrrO8jLFlzAi9P J8ybUVnjfB1xzJyzRhm8ErGxHgQhiBWbZZOlgNDMWxaJD/R7OCOx3oYKrAD3izzpZcDQ E4EIz8AbC+z7jAG4HHTrpv+fmntkzL8TGCmdcMTths+dhHdyIqCY3zJWlxXA27DKJUIc DED7lxMo8evob1knLdgLSxIp59PO/RZh5yIEtrGaMf/riLzaHIak7wAI5kwilCuPnPlL znKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hKOF7i2C; 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 pj12-20020a17090b4f4c00b001fbac5751a2si2531121pjb.87.2022.08.31.10.42.23; Wed, 31 Aug 2022 10:42:36 -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=hKOF7i2C; 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 S232024AbiHaRjR (ORCPT + 99 others); Wed, 31 Aug 2022 13:39:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231984AbiHaRjE (ORCPT ); Wed, 31 Aug 2022 13:39:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E73CD2B35; Wed, 31 Aug 2022 10:39:02 -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 5F23AB8220A; Wed, 31 Aug 2022 17:39:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCD46C433C1; Wed, 31 Aug 2022 17:38:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661967539; bh=sWEr2xMf9c7ybMRCB7FvcjLwjU8c0HJfCMDxZvDmsi4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hKOF7i2CshRktPzeGXQwfSNA4H3HLA2mer2CnxVIJhQunFzZuaf0PO3W7onzBsAfR YpQMKnOqABfenu8nfZyRuAjLt6xmYs8CBqsUXKdYGaI7QGeOcN+vI0JHg8/rzMNnT9 2gvuJnD2blULZZCCMPQEzPiWqIa02mvUnd+uE36C0HcOC5ExzTtAvXOuOPcvmElh5W cyMwpDoqq06AohcnYM72QSQp0yiszyHi8eP0B9qlNJkFnWIyC6ujvKoMeknBak0j2N h8OLnBeOSIHDlL0JZ14E14sYq2wTb4waF+lQcFOL6UJtpresw+YBAcGz0RqjvTg8+Z eIPPt+47ljMig== From: Jarkko Sakkinen To: linux-sgx@vger.kernel.org Cc: Haitao Huang , Vijay Dhanraj , Reinette Chatre , Dave Hansen , Paul Menzel , Jarkko Sakkinen , Shuah Khan , linux-kernel@vger.kernel.org (open list), linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK) Subject: [PATCH v2 6/6] selftests/sgx: Add a bpftrace script for tracking allocation errors Date: Wed, 31 Aug 2022 20:38:29 +0300 Message-Id: <20220831173829.126661-7-jarkko@kernel.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220831173829.126661-1-jarkko@kernel.org> References: <20220831173829.126661-1-jarkko@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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); +} -- 2.37.2