2022-09-05 02:38:53

by Jarkko Sakkinen

[permalink] [raw]
Subject: [PATCH v2 2/5] selftests/sgx: Move ENCL_HEAP_SIZE_DEFAULT to main.c

Move ENCL_HEAP_SIZE_DEFAULT to main.c because all the other constants
are also there, and it is only used locally there.

Signed-off-by: Jarkko Sakkinen <[email protected]>
---
tools/testing/selftests/sgx/main.c | 1 +
tools/testing/selftests/sgx/main.h | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/testing/selftests/sgx/main.c b/tools/testing/selftests/sgx/main.c
index 59cca806eda1..a1850e139c99 100644
--- a/tools/testing/selftests/sgx/main.c
+++ b/tools/testing/selftests/sgx/main.c
@@ -21,6 +21,7 @@
#include "../kselftest_harness.h"
#include "main.h"

+static const size_t ENCL_HEAP_SIZE_DEFAULT = PAGE_SIZE;
static const uint64_t MAGIC = 0x1122334455667788ULL;
static const uint64_t MAGIC2 = 0x8877665544332211ULL;
vdso_sgx_enter_enclave_t vdso_sgx_enter_enclave;
diff --git a/tools/testing/selftests/sgx/main.h b/tools/testing/selftests/sgx/main.h
index fc585be97e2f..82b33f8db048 100644
--- a/tools/testing/selftests/sgx/main.h
+++ b/tools/testing/selftests/sgx/main.h
@@ -6,8 +6,6 @@
#ifndef MAIN_H
#define MAIN_H

-#define ENCL_HEAP_SIZE_DEFAULT 4096
-
struct encl_segment {
void *src;
off_t offset;
--
2.37.2


2022-09-08 22:45:29

by Reinette Chatre

[permalink] [raw]
Subject: Re: [PATCH v2 2/5] selftests/sgx: Move ENCL_HEAP_SIZE_DEFAULT to main.c



On 9/4/2022 7:04 PM, Jarkko Sakkinen wrote:
> Move ENCL_HEAP_SIZE_DEFAULT to main.c because all the other constants
> are also there, and it is only used locally there.
>
> Signed-off-by: Jarkko Sakkinen <[email protected]>

Acked-by: Reinette Chatre <[email protected]>

Reinette