Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

Gramine Integartion with Avalon #775

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ntk97
Copy link

@ntk97 ntk97 commented Oct 29, 2021

This PR has the changes required to integrate @Gramine with Avalon.

Changes includes:

  • GSC build scripts
  • Device mapping for gsgx in yaml files
  • Manifest file (avalon.manifest)
  • Graphene workload tutorials
  • few Readme file modifications

echo $LIST_MANIFEST_FILES

MANIFEST_FILE="${TCF_HOME}tc/graphene/python_worker/graphene_sgx/manifest/avalon.manifest"
echo $MANIFEST_FILE
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to print manifest filename? You could remove if added for debugging.

Copy link
Author

Choose a reason for hiding this comment

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

Added for debugging purpose, removed now


# Build image
echo "Build unsigned GSC image"
./gsc build --insecure-args $IMAGE_NAME $LIST_MANIFEST_FILES
sudo ./gsc build --insecure-args $IMAGE_NAME $MANIFEST_FILE
Copy link
Contributor

Choose a reason for hiding this comment

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

Why sudo needed here? gsc binary should run with user permission itself.

Copy link
Author

Choose a reason for hiding this comment

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

yes, sudo is not required. gsc runs with user permission, tested with gramine production release.

Removed sudo, in all the gsc build scripts

sudo ./gsc sign-image $IMAGE_NAME $SIGN_KEY_FILE

# Retrieve SGX-related information from graphenized image using gsc info-image
# sudo ./gsc info-image $IMAGE_NAME
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove commented lines.

Copy link
Author

Choose a reason for hiding this comment

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

Removed

@@ -0,0 +1,34 @@
#!/usr/bin/env python

# Copyright 2020 Intel Corporation
Copy link
Contributor

Choose a reason for hiding this comment

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

change copyright to 2021

Copy link
Author

Choose a reason for hiding this comment

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

Updated the copyright to 2021

@@ -167,7 +167,7 @@ COPY ./enclave_manager/Makefile-graphene /project/avalon/enclave_manager/
COPY ./enclave_manager/avalon_enclave_manager/*.py /project/avalon/enclave_manager/avalon_enclave_manager/
COPY ./enclave_manager/avalon_enclave_manager/${ENCLAVE_TYPE} /project/avalon/enclave_manager/avalon_enclave_manager/${ENCLAVE_TYPE}
COPY ./enclave_manager/avalon_enclave_manager/wpe_common /project/avalon/enclave_manager/avalon_enclave_manager/wpe_common
COPY ./wpe_mr_enclave.txt /project/avalon/
# COPY ./wpe_mr_enclave.txt /project/avalon/
Copy link
Contributor

Choose a reason for hiding this comment

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

remove the line

Copy link
Author

Choose a reason for hiding this comment

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

Removed

done
echo $LIST_MANIFEST_FILES

MANIFEST_FILE="./avalon.manifest" #"${TCF_HOME}tc/graphene/python_worker/graphene_sgx/manifest/python.manifest"
Copy link
Contributor

Choose a reason for hiding this comment

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

its better to address file with absolute path than relative path, it leads to bugs if run from different paths

Copy link
Author

Choose a reason for hiding this comment

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

Addressed the file with absolute path.


# Build image
echo "Build unsigned GSC image"
./gsc build --insecure-args $IMAGE_NAME $LIST_MANIFEST_FILES
sudo ./gsc build --insecure-args $IMAGE_NAME $MANIFEST_FILE
Copy link
Contributor

Choose a reason for hiding this comment

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

remove sudo here and everywhere

@ntk97 ntk97 requested a review from manju956 November 15, 2021 16:40
@ntk97
Copy link
Author

ntk97 commented Nov 15, 2021

@manju956, Have addressed all the review comments and appended the changes to the same commit itself.

Copy link
Contributor

@manju956 manju956 left a comment

Choose a reason for hiding this comment

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

Looks good

@manju956
Copy link
Contributor

This PR has the changes required to integrate @Gramine with Avalon.

Changes includes:

  • GSC build scripts
  • Device mapping for gsgx in yaml files
  • Manifest file (avalon.manifest)
  • Graphene workload tutorials
  • few Readme file modifications

DCO check failed. Include sign-off while creating commit and push

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

Successfully merging this pull request may close these issues.

2 participants