[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220831173829.126661-7-jarkko@kernel.org>
Date: Wed, 31 Aug 2022 20:38:29 +0300
From: Jarkko Sakkinen <jarkko@...nel.org>
To: linux-sgx@...r.kernel.org
Cc: Haitao Huang <haitao.huang@...ux.intel.com>,
Vijay Dhanraj <vijay.dhanraj@...el.com>,
Reinette Chatre <reinette.chatre@...el.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Paul Menzel <pmenzel@...gen.mpg.de>,
Jarkko Sakkinen <jarkko@...nel.org>,
Shuah Khan <shuah@...nel.org>,
linux-kernel@...r.kernel.org (open list),
linux-kselftest@...r.kernel.org (open list:KERNEL SELFTEST FRAMEWORK)
Subject: [PATCH v2 6/6] selftests/sgx: Add a bpftrace script for tracking allocation errors
Signed-off-by: Jarkko Sakkinen <jarkko@...nel.org>
---
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
Powered by blists - more mailing lists