mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 22:01:29 +00:00
[Pal/Linux-SGX] Increase MAX_DBG_THREADS constant from 64 to 1024
An internal Graphene structure for GDB metadata limits the number of enclave threads to MAX_DBG_THREADS. Previously, it was set to 64, which was enough for typical platforms. However, powerful servers have hundreds of logical cores. Graphene-SGX failed with error on such servers. This commit increases the limit to 1024.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#define MAX_DBG_THREADS 64
|
||||
#define MAX_DBG_THREADS 1024
|
||||
|
||||
/* This address is shared between our GDB and Graphene-SGX and must
|
||||
* reside in non-enclave memory. Graphene-SGX puts an enclave_dbginfo
|
||||
|
||||
@@ -234,9 +234,11 @@ int initialize_enclave (struct pal_enclave * enclave)
|
||||
sgx_arch_enclave_css_t enclave_sigstruct;
|
||||
sgx_arch_secs_t enclave_secs;
|
||||
unsigned long enclave_entry_addr;
|
||||
void* tcs_addrs[MAX_DBG_THREADS];
|
||||
unsigned long heap_min = DEFAULT_HEAP_MIN;
|
||||
|
||||
/* this array may overflow the stack, so we allocate it in BSS */
|
||||
static void* tcs_addrs[MAX_DBG_THREADS];
|
||||
|
||||
enclave_image = INLINE_SYSCALL(open, 3, ENCLAVE_FILENAME, O_RDONLY, 0);
|
||||
if (IS_ERR(enclave_image)) {
|
||||
SGX_DBG(DBG_E, "Cannot find %s\n", ENCLAVE_FILENAME);
|
||||
|
||||
Reference in New Issue
Block a user