Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enclave creation fails with out of memory. Unable to run sample code #134

Open
anjalirai-intel opened this issue Jul 23, 2021 · 1 comment

Comments

@anjalirai-intel
Copy link

I was building Kernel 5.12.18 on RHEL 8.0 platform. The SGX enclave failed to create by throwing Out Of Memory error.

It is run on the server and it has huge memory

Memory Details:

[SampleEnclave]$ free -h
              total        used        free      shared  buff/cache   available
Mem:          125Gi       3.0Gi       121Gi        17Mi       1.3Gi       121Gi
Swap:         4.0Gi          0B       4.0Gi

Sample Code Execution:-
[intel@intel SampleEnclave]$ ../app
-bash: ../app: No such file or directory
[intel@intel SampleEnclave]$ ./app
Error: Out of memory.
Enter a character before exit ...

Dmesg Output:-
RIP: 0010:ksgxd+0x92/0x2d0
[ 37.418648] Code: 48 89 ef e8 00 f2 ff ff 48 63 c3 48 8d 04 c0 49 8d 04 c4 48 8b 50 38 48 8d 45 38 48 39 c2 74 0c 89 de 4c 89 ef e8 5d f9 8f 00 <0f> 0b 83 c3 01 48 83 c5 48 39 1d ef fe fb 01 7f c5 e8 c8 b7 0a 00
[ 37.418649] RSP: 0018:ff86332808c03ec0 EFLAGS: 00010282
[ 37.418651] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000027
[ 37.418651] RDX: 0000000000000027 RSI: ff48646e3f7577f0 RDI: ff48646e3f7577f8
[ 37.418652] RBP: ffffffff99008d88 R08: 0000000000000000 R09: c0000000fffeffff
[ 37.418653] R10: 0000000000000001 R11: ff86332808c03cc8 R12: ffffffff99008d40
[ 37.418653] R13: ffffffff980f9670 R14: 0000000000000000 R15: ff48644f09159ec0
[ 37.418654] FS: 0000000000000000(0000) GS:ff48646e3f740000(0000) knlGS:0000000000000000
[ 37.418655] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 37.418656] CR2: 00007f9a3fbdc6d6 CR3: 0000000f87a0a003 CR4: 0000000000771ee0
[ 37.418657] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 37.418657] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 37.418658] PKRU: 55555554
[ 37.418659] Call Trace:
[ 37.418661] ? sgx_alloc_epc_page+0x140/0x140
[ 37.418663] kthread+0x11a/0x140
[ 37.418666] ? set_kthread_struct+0x40/0x40
[ 37.418668] ret_from_fork+0x1f/0x30
[ 37.418671] ---[ end trace b218459e3ab9df36 ]---

@haitaohuang
Copy link
Contributor

If this is an FLC platform (e.g. ICX), your kernel already has SGX built-in support. You should not use this driver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants