Re: [apache/incubator-teaclave-sgx-sdk] Implement enclave memory management (PR #436)

2024-05-27 Thread Zehuan Li
@yangfh2004 Hello, I'm pleased to know that the EDMM feature has been 
integrated into your project. Unfortunately, the simulation mode (SW mode) for 
EDMM is not on our current roadmap, primarily because Intel does not offer 
support for EDMM in SW mode, and I am currently at full capacity, preventing me 
from undertaking the implementation of this feature.

However, conceptually speaking, I believe the SW mode could be relatively 
straightforward to implement using system calls like mmap and munmap.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/436#issuecomment-2133031533
You are receiving this because you are subscribed to this thread.

Message ID: 

Re: [apache/incubator-teaclave-sgx-sdk] Implement enclave memory management (PR #436)

2024-04-24 Thread Fanghao Yang
@ClawSeven Hi, our team is using your emm branch, which works OK. But we want 
to request some supports to the simulation mode (SW mode) so that we can build 
and run our enclave without sgx drivers. Do you have a chance to add SW 
supports to your branch? Thanks

-- 
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/436#issuecomment-2075548631
You are receiving this because you are subscribed to this thread.

Message ID: 

Re: [apache/incubator-teaclave-sgx-sdk] Implement enclave memory management (PR #436)

2024-02-23 Thread Zehuan Li
@yangfh2004 Btw, I have tested the `httpreq` with `rustc 1.78.0-nightly 
(397937d81 2024-02-22)`. It also worked well.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/436#issuecomment-1960986008
You are receiving this because you are subscribed to this thread.

Message ID: 

Re: [apache/incubator-teaclave-sgx-sdk] Implement enclave memory management (PR #436)

2024-02-23 Thread Zehuan Li
@yangfh2004 , Hi, thanks for your two issue.
1. Regarding the first issue, I have managed to replicate it and have confirmed 
that the Makefile for the EMM sample code indeed requires thread feature 
activation. I will address and resolve this promptly.

2. As for the second issue, I am unable to reproduce the scenario you've 
described. In my environment, the `httpreq` sample code works well without any 
panic. Could you please provide the version of your toolchain so that I can 
further investigate this matter?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/436#issuecomment-1960966112
You are receiving this because you are subscribed to this thread.

Message ID: 

Re: [apache/incubator-teaclave-sgx-sdk] Implement enclave memory management (PR #436)

2024-02-19 Thread Fanghao Yang
> @ClawSeven Hi, I notice two issues with your PR:
> 
> 1. your `emm` sample code cannot be built with `BUILD_STD=cargo`
> 2. I merged your commits in this PR into the current `v2.0.0-preview` branch 
> to support the latest rust toolchain as this [fork 
> branch](https://gitlab.com/dexlabs/incubator-teaclave-sgx-sdk/-/tree/v2.0.0-sgx-emm?ref_type=heads),
>  however, I see problems with `httpreq` sample code, it will have pointer 
> alignment issues while doing ocall "u_getaddrinfo_ocall", the pointer address 
> of the argument and the return value is misaligned, which will cause panic in 
> the repo. It seems that your implementation has some conflicts with the 
> recent Rust toolchain.
>Please take a look, thank you!

The second issue has an easy fix, essentially, all problems are due to the 
alignment checks in dereference of raw pointers. We just need to use 
`read_unaligned` or `write_unaligned`

-- 
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/436#issuecomment-1952851066
You are receiving this because you are subscribed to this thread.

Message ID: 

Re: [apache/incubator-teaclave-sgx-sdk] Implement enclave memory management (PR #436)

2024-02-18 Thread Fanghao Yang
> > @ClawSeven Hi, I notice two issues with your PR:
> > 
> > 1. your `emm` sample code cannot be built with `BUILD_STD=cargo`
> > 2. I merged your commits in this PR into the current `v2.0.0-preview` 
> > branch to support the latest rust toolchain as this [fork 
> > branch](https://gitlab.com/dexlabs/incubator-teaclave-sgx-sdk/-/tree/v2.0.0-sgx-emm?ref_type=heads),
> >  however, I see problems with `httpreq` sample code, it will have pointer 
> > alignment issues while doing ocall "u_getaddrinfo_ocall", the pointer 
> > address of the argument and the return value is misaligned, which will 
> > cause panic in the repo. It seems that your implementation has some 
> > conflicts with the recent Rust toolchain.
> >Please take a look, thank you!
> 
> Is upgrading Intel SGX SDK to 2.21 to enable EDMM?

Thanks a lot for your reply, we are using SGX2 on 3rd Gen Xeon Scalable 
Processor with MKTME, and we will need large dynamic heap allocations. We are 
now using v1.1.6 with Intel SGX SDK 2.21. We are trying to upgrade to v2.0.0 
with support to the later Rust toolchain.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/436#issuecomment-1951412654
You are receiving this because you are subscribed to this thread.

Message ID: 

Re: [apache/incubator-teaclave-sgx-sdk] Implement enclave memory management (PR #436)

2024-02-17 Thread volcano
> @ClawSeven Hi, I notice two issues with your PR:
> 
> 1. your `emm` sample code cannot be built with `BUILD_STD=cargo`
> 2. I merged your commits in this PR into the current `v2.0.0-preview` branch 
> to support the latest rust toolchain as this [fork 
> branch](https://gitlab.com/dexlabs/incubator-teaclave-sgx-sdk/-/tree/v2.0.0-sgx-emm?ref_type=heads),
>  however, I see problems with `httpreq` sample code, it will have pointer 
> alignment issues while doing ocall "u_getaddrinfo_ocall", the pointer address 
> of the argument and the return value is misaligned, which will cause panic in 
> the repo. It seems that your implementation has some conflicts with the 
> recent Rust toolchain.
>Please take a look, thank you!

Is upgrading Intel SGX SDK to 2.21 to enable EDMM?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/436#issuecomment-1950779980
You are receiving this because you are subscribed to this thread.

Message ID: 

Re: [apache/incubator-teaclave-sgx-sdk] Implement enclave memory management (PR #436)

2024-02-16 Thread Fanghao Yang
@ClawSeven 
Hi, I notice two issues with your PR:
1. your `emm` sample code cannot be built with `BUILD_STD=cargo`
2. I merged your commits in this PR into the current `v2.0.0-preview` branch to 
support the latest rust toolchain as this [fork 
branch](https://gitlab.com/dexlabs/incubator-teaclave-sgx-sdk/-/tree/v2.0.0-sgx-emm?ref_type=heads),
 however, I see problems with `httpreq` sample code, it will have pointer 
alignment issues while doing ocall "u_getaddrinfo_ocall", the pointer address 
of the argument and the return value is misaligned, which will cause panic in 
the repo. It seems that your implementation has some conflicts with the recent 
Rust toolchain.
Please take a look, thank you!

-- 
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/436#issuecomment-1949443072
You are receiving this because you are subscribed to this thread.

Message ID: