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

provide settings configuration to set config_id/config_svn on ice lake platform enclaves #3799

Merged
merged 1 commit into from
Feb 12, 2021

Conversation

manojrupireddy
Copy link
Member

@manojrupireddy manojrupireddy commented Jan 14, 2021

This is in continuation to the work done by Alvin => #3735.
Made changes to the above draft PR , based on the code review comments there.
Signed-off-by: manoj rupireddy marupire@microsoft.com

Copy link
Contributor

@CodeMonkeyLeet CodeMonkeyLeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the old PR forwards! See comments for suggestions and concerns.

include/openenclave/host.h Outdated Show resolved Hide resolved
include/openenclave/host.h Outdated Show resolved Hide resolved
host/sgx/create.c Outdated Show resolved Hide resolved
host/sgx/create.c Outdated Show resolved Hide resolved
host/sgx/create.c Outdated Show resolved Hide resolved
host/sgx/create.c Outdated Show resolved Hide resolved
host/sgx/create.c Outdated Show resolved Hide resolved
host/sgx/create.c Outdated Show resolved Hide resolved
host/sgx/create.c Outdated Show resolved Hide resolved
*/
typedef struct _oe_enclave_setting_config_data
{
uint8_t enclave_config_id[64];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the spec and #3054, the config id should be 32 bytes. Could you double check?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uint8_t enclave_config_id[64];
uint8_t config_id[32];

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add @bodzhang

Copy link
Member Author

@manojrupireddy manojrupireddy Jan 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bodzhang , Can you confirm if this is the right data structure to use for SECS data structure.
I am planning to replicate the below intels secs_t structure in OE codebase and in intel codebase config_id is allocated 64 bytes. https://github.com/intel/linux-sgx/blob/d3bd1571240bcdf85734c232a4f0c86828443ebb/common/inc/internal/arch.h#L59

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seem to be an inconsistent in the Intel manual. According to the table 37-2 (secs) and 37-23 (report), the configid field should be 64 bytes. However, the text in 38.4.1.3 mentions that "enclave is created the platform can additionally provide 32-byte configuration identifier (CONFIGID).". I think it should be fine to keep 64 bytes for now.

include/openenclave/host.h Outdated Show resolved Hide resolved
include/openenclave/internal/sgxcreate.h Outdated Show resolved Hide resolved
@@ -292,7 +292,10 @@ typedef struct _sgx_secs
uint8_t reserved3[96]; /* 160 */
uint16_t isvvprodid; /* 256 */
uint16_t isvsvn; /* 258 */
uint8_t reserved[3836]; /* 260 */
uint8_t reserved4[20]; /* 260 */
uint8_t config_id[64]; /* 280 */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check if this is 32 or 64 bytes.

include/openenclave/host.h Outdated Show resolved Hide resolved
include/openenclave/host.h Outdated Show resolved Hide resolved
host/sgx/create.c Outdated Show resolved Hide resolved
@radhikaj radhikaj added this to the v0.14 milestone Jan 25, 2021
@radhikaj radhikaj added this to InProgress in v0.14 Jan 25, 2021
Copy link
Collaborator

@mingweishih mingweishih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for addressing all the feedbacks.

tests/CMakeLists.txt Outdated Show resolved Hide resolved
tests/icelake_config_id/enc/enc.cpp Outdated Show resolved Hide resolved
tests/icelake_config_id/enc/enc.cpp Outdated Show resolved Hide resolved
tests/icelake_config_id/enc/enc.cpp Outdated Show resolved Hide resolved
tests/icelake_config_id/enc/CMakeLists.txt Outdated Show resolved Hide resolved
tests/icelake_config_id/icelake_config_id.edl Outdated Show resolved Hide resolved
tests/icelake_config_id/icelake_config_id.edl Outdated Show resolved Hide resolved
tests/icelake_config_id/host/host.cpp Outdated Show resolved Hide resolved
tests/icelake_config_id/host/host.cpp Outdated Show resolved Hide resolved
tests/icelake_config_id/host/host.cpp Outdated Show resolved Hide resolved
@mingweishih
Copy link
Collaborator

bors r+

bors bot pushed a commit that referenced this pull request Feb 10, 2021
3799: provide settings configuration to set config_id/config_svn on ice lake platform enclaves r=mingweishih a=manojrupireddy

This is in continuation to the work done by Alvin => #3735.
Made changes to the above draft PR , based on the code review comments there.
Signed-off-by: manoj rupireddy <marupire@microsoft.com>

Co-authored-by: manoj rupireddy <marupire@microsoft.com>
@bors
Copy link

bors bot commented Feb 10, 2021

Build failed:

@manojrupireddy
Copy link
Member Author

bors r+

@bors
Copy link

bors bot commented Feb 10, 2021

🔒 Permission denied

Existing reviewers: click here to make manojrupireddy a reviewer

@mingweishih
Copy link
Collaborator

bors r+

bors bot pushed a commit that referenced this pull request Feb 10, 2021
3799: provide settings configuration to set config_id/config_svn on ice lake platform enclaves r=mingweishih a=manojrupireddy

This is in continuation to the work done by Alvin => #3735.
Made changes to the above draft PR , based on the code review comments there.
Signed-off-by: manoj rupireddy <marupire@microsoft.com>

Co-authored-by: manoj rupireddy <marupire@microsoft.com>
@bors
Copy link

bors bot commented Feb 11, 2021

Build failed:

@mingweishih
Copy link
Collaborator

bors delegate+

@bors
Copy link

bors bot commented Feb 11, 2021

✌️ manojrupireddy can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

…e platform enclaves

Signed-off-by: manoj rupireddy <marupire@microsoft.com>
@manojrupireddy
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Feb 11, 2021
3799: provide settings configuration to set config_id/config_svn on ice lake platform enclaves r=manojrupireddy a=manojrupireddy

This is in continuation to the work done by Alvin => #3735.
Made changes to the above draft PR , based on the code review comments there.
Signed-off-by: manoj rupireddy <marupire@microsoft.com>

Co-authored-by: manoj rupireddy <marupire@microsoft.com>
@bors
Copy link

bors bot commented Feb 11, 2021

Build failed:

@manojrupireddy
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Feb 11, 2021
3799: provide settings configuration to set config_id/config_svn on ice lake platform enclaves r=manojrupireddy a=manojrupireddy

This is in continuation to the work done by Alvin => #3735.
Made changes to the above draft PR , based on the code review comments there.
Signed-off-by: manoj rupireddy <marupire@microsoft.com>

3826: replacing constant salt with per-file random salt r=mingweishih a=RRathna

replacing constant salt, and generating it randomly per file to be encrypted.
Fixes  #3692

3831: Update the oeedger8r submodule r=mingweishih a=mingweishih

This PR sync up the oeedger8r against the master branch, which introduces the following changes:
- Enforce the safe multiplication (see the [PR](openenclave/oeedger8r-cpp#31)). Fix #2390
- Add checks against pointer array arguments (see the [PR](openenclave/oeedger8r-cpp#65)). Fix #3557
- Make the oeedger8r-generated variables conform OE guidelines (see the [PR](openenclave/oeedger8r-cpp#66)). Fix #3210
- Add new warning options for the non-serializable cases (see the [PR](openenclave/oeedger8r-cpp#67)). Fix #3513

Co-authored-by: manoj rupireddy <marupire@microsoft.com>
Co-authored-by: rrathna <rathna1993@gmail.com>
Co-authored-by: Ming-Wei Shih <mishih@microsoft.com>
@bors
Copy link

bors bot commented Feb 11, 2021

This PR was included in a batch that was canceled, it will be automatically retried

@mingweishih
Copy link
Collaborator

bors r-

@bors
Copy link

bors bot commented Feb 12, 2021

Canceled.

@mingweishih
Copy link
Collaborator

bors r+

bors bot pushed a commit that referenced this pull request Feb 12, 2021
3799: provide settings configuration to set config_id/config_svn on ice lake platform enclaves r=mingweishih a=manojrupireddy

This is in continuation to the work done by Alvin => #3735.
Made changes to the above draft PR , based on the code review comments there.
Signed-off-by: manoj rupireddy <marupire@microsoft.com>

3824: Avoid recompiling common files for each ssl test r=mingweishih a=anakrish

This reduces the number of files being compiled and also allows
cmake to parallelize builds better.
Most dev machines should see some drop in build times.
E.g: In my machine, tests/openssl build time drops from 192 secs
to 90 secs.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>

3826: replacing constant salt with per-file random salt r=mingweishih a=RRathna

replacing constant salt, and generating it randomly per file to be encrypted.
Fixes  #3692

Co-authored-by: manoj rupireddy <marupire@microsoft.com>
Co-authored-by: Anand Krishnamoorthi <anakrish@microsoft.com>
Co-authored-by: rrathna <rathna1993@gmail.com>
@bors
Copy link

bors bot commented Feb 12, 2021

Build failed (retrying...):

@bors
Copy link

bors bot commented Feb 12, 2021

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v0.14
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants