Skip to content

Commit

Permalink
Update SGX SDK to 2.21 (#3618)
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-mobilecoin authored Oct 17, 2023
1 parent 7db5ae2 commit 3aaaa39
Show file tree
Hide file tree
Showing 21 changed files with 43 additions and 43 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ permissions:
jobs:
build-dev:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

steps:
- name: Check out code
Expand All @@ -42,7 +42,7 @@ jobs:

build-prod:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

steps:
- name: Check out code
Expand All @@ -62,7 +62,7 @@ jobs:

build-and-test-wasm:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

steps:
- name: Check out code
Expand All @@ -76,7 +76,7 @@ jobs:

lint-rust:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

steps:
- name: Check out code
Expand All @@ -93,7 +93,7 @@ jobs:

build-and-test-go:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

steps:
- name: Check out code
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:

docs:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

steps:
- name: Check out code
Expand All @@ -145,7 +145,7 @@ jobs:

mc-tests:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

strategy:
matrix:
Expand Down Expand Up @@ -188,7 +188,7 @@ jobs:

consensus-tests:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

strategy:
matrix:
Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:

fog-tests:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

strategy:
matrix:
Expand Down Expand Up @@ -272,7 +272,7 @@ jobs:

fog-ingest-tests:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

steps:
- name: Check out code
Expand All @@ -295,7 +295,7 @@ jobs:

fog-conformance-tests:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

steps:
- name: Check out code
Expand Down Expand Up @@ -335,7 +335,7 @@ jobs:

fog-local-network-tests:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

steps:
- name: Check out code
Expand Down Expand Up @@ -522,7 +522,7 @@ jobs:

minting-and-burning-tests:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

steps:
- name: Check out code
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependent-repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
jobs:
android-bindings:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

permissions:
pull-requests: write
Expand All @@ -30,7 +30,7 @@ jobs:

full-service:
runs-on: [self-hosted, Linux, large]
container: mobilecoin/builder-install:v0.0.29
container: mobilecoin/builder-install:v0.0.30

permissions:
pull-requests: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mobilecoin-dev-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- generate-metadata
runs-on: [self-hosted, Linux, large-cd]
container:
image: mobilecoin/rust-sgx-base:v0.0.29
image: mobilecoin/rust-sgx-base:v0.0.30

env:
ENCLAVE_SIGNING_KEY_PATH: ${{ github.workspace }}/.tmp/enclave_signing.pem
Expand Down
4 changes: 2 additions & 2 deletions .internal-ci/docker/Dockerfile.dcap-runtime-base
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN apt-get update \
COPY .internal-ci/docker/support/intel-sgx-archive-keyring.gpg /etc/apt/trusted.gpg.d/
RUN echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/intel-sgx-archive-keyring.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu/ focal main" > /etc/apt/sources.list.d/intel-sgx.list

ARG SGX_SDK_VERSION=2.20.100.4-focal1
ARG SGX_SDK_VERSION=2.21.100.1-focal1
ENV SGX_SDK_VERSION=${SGX_SDK_VERSION}

# Explicitly call out *all* dependency versions. This is because the Intel
Expand All @@ -37,7 +37,7 @@ RUN apt-get update \
&& rm -r /var/lib/apt/lists

# Install DCAP libraries
ARG DCAP_VERSION=1.17.100.4-focal1
ARG DCAP_VERSION=1.18.100.1-focal1
ENV DCAP_VERSION=${DCAP_VERSION}

# Explicitly call out *all* dependency versions. This is because the Intel
Expand Down
4 changes: 2 additions & 2 deletions .internal-ci/docker/Dockerfile.runtime-base
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ ENV LD_LIBRARY_PATH="/opt/intel/sgx-aesm-service/aesm"
# libsgx-enclave-common libsgx-epid libsgx-launch libsgx-pce-logic libsgx-urts
# sgx-aesm-service
# Use `apt show -a sgx-aesm-service` to find version
ENV AESM_VERSION=2.20.100.4-focal1
ENV AESM_VERSION=2.21.100.1-focal1
# Use `apt show -a libsgx-pce-logic` to find the version thats compatible with aesm.
ENV PCE_LOGIC_VERSION=1.17.100.4-focal1
ENV PCE_LOGIC_VERSION=1.18.100.1-focal1


# Install packages
Expand Down
4 changes: 2 additions & 2 deletions .mobconf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[image]
url = mobilecoin/builder-install
tag = v0.0.29
tag = v0.0.30
[builder-install]
url = mobilecoin/builder-install
tag = v0.0.29
tag = v0.0.30
[signing-tools]
url = mobilecoin/signing-tools
tag = v0.0.1
2 changes: 1 addition & 1 deletion consensus/enclave/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const SGX_SIMULATION_LIBS: &[&str] = &["libsgx_urts_sim", "libsgx_epid_sim"];

// Changing this version is a breaking change, you must update the crate version
// if you do.
const SGX_VERSION: &str = "2.20.100.4";
const SGX_VERSION: &str = "2.21.100.1";

fn main() {
let env = Environment::default();
Expand Down
2 changes: 1 addition & 1 deletion consensus/enclave/measurement/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::{env::var, path::PathBuf};

// Changing this version is a breaking change, you must update the crate version
// if you do.
const SGX_VERSION: &str = "2.20.100.4";
const SGX_VERSION: &str = "2.21.100.1";

const CONSENSUS_ENCLAVE_PRODUCT_ID: u16 = 1;
const CONSENSUS_ENCLAVE_SECURITY_VERSION: u16 = 8;
Expand Down
2 changes: 1 addition & 1 deletion consensus/enclave/trusted/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const SGX_SIMULATION_LIBS: &[&str] = &["libsgx_urts_sim", "libsgx_epid_sim"];

// Changing this version is a breaking change, you must update the crate version
// if you do.
const SGX_VERSION: &str = "2.20.100.4";
const SGX_VERSION: &str = "2.21.100.1";

fn main() {
let env = Environment::default();
Expand Down
8 changes: 4 additions & 4 deletions consensus/service/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ Recommended SDK and package installation:
(
. /etc/os-release

wget "https://download.01.org/intel-sgx/sgx-linux/2.20/distro/ubuntu${VERSION_ID}-server/sgx_linux_x64_sdk_2.20.100.4.bin"
wget "https://download.01.org/intel-sgx/sgx-linux/2.20/distro/ubuntu${VERSION_ID}-server/sgx_linux_x64_driver_2.11.54c9c4c.bin"
wget "https://download.01.org/intel-sgx/sgx-linux/2.21/distro/ubuntu${VERSION_ID}-server/sgx_linux_x64_sdk_2.21.100.1.bin"
wget "https://download.01.org/intel-sgx/sgx-linux/2.21/distro/ubuntu${VERSION_ID}-server/sgx_linux_x64_driver_2.11.54c9c4c.bin"

echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/intel-sgx-archive-keyring.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu/ ${UBUNTU_CODENAME} main" > /etc/apt/sources.list.d/intel-sgx.list
)
Expand All @@ -112,8 +112,8 @@ chmod +x ./sgx_linux_x64_driver_2.11.054c9c4c.bin
./sgx_linux_x64_driver_2.11.054c9c4c.bin

# Install the SDK to /opt/intel/sgxsdk
chmod +x ./sgx_linux_x64_sdk_2.20.100.4.bin
./sgx_linux_x64_sdk_2.20.100.4.bin --prefix=/opt/intel
chmod +x ./sgx_linux_x64_sdk_2.21.100.1.bin
./sgx_linux_x64_sdk_2.21.100.1.bin --prefix=/opt/intel

apt install libsgx-uae-service sgx-aesm-service

Expand Down
6 changes: 3 additions & 3 deletions docker/install_sgx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cd /tmp
(
. /etc/os-release

wget "https://download.01.org/intel-sgx/sgx-linux/2.20/distro/ubuntu${VERSION_ID}-server/sgx_linux_x64_sdk_2.20.100.4.bin"
wget "https://download.01.org/intel-sgx/sgx-linux/2.21/distro/ubuntu${VERSION_ID}-server/sgx_linux_x64_sdk_2.21.100.1.bin"

echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/intel-sgx-archive-keyring.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu/ ${UBUNTU_CODENAME} main" > /etc/apt/sources.list.d/intel-sgx.list
)
Expand Down Expand Up @@ -59,8 +59,8 @@ apt-get install -yq --no-install-recommends \

# Install *after* pkg-config so that they get registered correctly.
# pkg-config gets pulled in transitively via build-essential
chmod +x ./sgx_linux_x64_sdk_2.20.100.4.bin
./sgx_linux_x64_sdk_2.20.100.4.bin --prefix=/opt/intel
chmod +x ./sgx_linux_x64_sdk_2.21.100.1.bin
./sgx_linux_x64_sdk_2.21.100.1.bin --prefix=/opt/intel

# Update .bashrc to source sgxsdk
echo 'source /opt/intel/sgxsdk/environment' >> /root/.bashrc
Expand Down
2 changes: 1 addition & 1 deletion fog/ingest/enclave/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const SGX_SIMULATION_LIBS: &[&str] = &["libsgx_urts_sim", "libsgx_epid_sim"];

// Changing this version is a breaking change, you must update the crate version
// if you do.
const SGX_VERSION: &str = "2.20.100.4";
const SGX_VERSION: &str = "2.21.100.1";

fn main() {
let env = Environment::default();
Expand Down
2 changes: 1 addition & 1 deletion fog/ingest/enclave/measurement/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::{env::var, path::PathBuf};

// Changing this version is a breaking change, you must update the crate version
// if you do.
const SGX_VERSION: &str = "2.20.100.4";
const SGX_VERSION: &str = "2.21.100.1";

const INGEST_ENCLAVE_PRODUCT_ID: u16 = 4;
const INGEST_ENCLAVE_SECURITY_VERSION: u16 = 7;
Expand Down
2 changes: 1 addition & 1 deletion fog/ingest/enclave/trusted/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const SGX_SIMULATION_LIBS: &[&str] = &["libsgx_urts_sim", "libsgx_epid_sim"];

// Changing this version is a breaking change, you must update the crate version
// if you do.
const SGX_VERSION: &str = "2.20.100.4";
const SGX_VERSION: &str = "2.21.100.1";

fn main() {
let env = Environment::default();
Expand Down
2 changes: 1 addition & 1 deletion fog/ledger/enclave/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const SGX_SIMULATION_LIBS: &[&str] = &["libsgx_urts_sim", "libsgx_epid_sim"];

// Changing this version is a breaking change, you must update the crate version
// if you do.
const SGX_VERSION: &str = "2.20.100.4";
const SGX_VERSION: &str = "2.21.100.1";

fn main() {
let env = Environment::default();
Expand Down
2 changes: 1 addition & 1 deletion fog/ledger/enclave/measurement/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::{env::var, path::PathBuf};

// Changing this version is a breaking change, you must update the crate version
// if you do.
const SGX_VERSION: &str = "2.20.100.4";
const SGX_VERSION: &str = "2.21.100.1";

const LEDGER_ENCLAVE_PRODUCT_ID: u16 = 2;
const LEDGER_ENCLAVE_SECURITY_VERSION: u16 = 7;
Expand Down
2 changes: 1 addition & 1 deletion fog/ledger/enclave/trusted/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const SGX_SIMULATION_LIBS: &[&str] = &["libsgx_urts_sim", "libsgx_epid_sim"];

// Changing this version is a breaking change, you must update the crate version
// if you do.
const SGX_VERSION: &str = "2.20.100.4";
const SGX_VERSION: &str = "2.21.100.1";

fn main() {
let env = Environment::default();
Expand Down
2 changes: 1 addition & 1 deletion fog/view/enclave/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const SGX_SIMULATION_LIBS: &[&str] = &["libsgx_urts_sim", "libsgx_epid_sim"];

// Changing this version is a breaking change, you must update the crate version
// if you do.
const SGX_VERSION: &str = "2.20.100.4";
const SGX_VERSION: &str = "2.21.100.1";

fn main() {
let env = Environment::default();
Expand Down
2 changes: 1 addition & 1 deletion fog/view/enclave/measurement/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::{env::var, path::PathBuf};

// Changing this version is a breaking change, you must update the crate version
// if you do.
const SGX_VERSION: &str = "2.20.100.4";
const SGX_VERSION: &str = "2.21.100.1";

const VIEW_ENCLAVE_PRODUCT_ID: u16 = 3;
const VIEW_ENCLAVE_SECURITY_VERSION: u16 = 7;
Expand Down
2 changes: 1 addition & 1 deletion fog/view/enclave/trusted/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const SGX_SIMULATION_LIBS: &[&str] = &["libsgx_urts_sim", "libsgx_epid_sim"];

// Changing this version is a breaking change, you must update the crate version
// if you do.
const SGX_VERSION: &str = "2.20.100.4";
const SGX_VERSION: &str = "2.21.100.1";

fn main() {
let env = Environment::default();
Expand Down
4 changes: 2 additions & 2 deletions ops/Dockerfile-consensus
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ RUN apt-get update -q -q && \

# Install SGX Ubuntu/Debian Repo
RUN source /etc/os-release && \
wget "https://download.01.org/intel-sgx/sgx-linux/2.20/distro/ubuntu${VERSION_ID}-server/sgx_linux_x64_driver_2.11.54c9c4c.bin" && \
wget "https://download.01.org/intel-sgx/sgx-linux/2.21/distro/ubuntu${VERSION_ID}-server/sgx_linux_x64_driver_2.11.54c9c4c.bin" && \

wget "https://download.01.org/intel-sgx/sgx-linux/2.20/distro/ubuntu${VERSION_ID}-server/sgx_linux_x64_sdk_2.20.100.4.bin" && \
wget "https://download.01.org/intel-sgx/sgx-linux/2.21/distro/ubuntu${VERSION_ID}-server/sgx_linux_x64_sdk_2.21.100.1.bin" && \
echo "deb [arch=amd64 signed-by=/usr/local/share/apt-keyrings/intel-sgx-archive-keyring.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu/ ${UBUNTU_CODENAME} main" > /etc/apt/sources.list.d/intel-sgx.list

RUN mkdir -p /usr/local/share/apt-keyrings && \
Expand Down

0 comments on commit 3aaaa39

Please sign in to comment.