From 2232358334d56647da3074274f313124a9d2d467 Mon Sep 17 00:00:00 2001 From: Jing He Date: Fri, 12 Aug 2022 00:24:15 -0400 Subject: [PATCH 1/3] simplify the build process: 1. Make all: make all 3 LVI mitigation configs by default 2. Make sgxssl: make non-mitigation config by default, and make one of the mitigation configs when the flag MITIGATION-CVE-2020-0551 is set Signed-off-by: Jing He --- Linux/Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Linux/Makefile b/Linux/Makefile index 9524f45f..ed6fcf64 100644 --- a/Linux/Makefile +++ b/Linux/Makefile @@ -32,12 +32,10 @@ include buildenv.mk include sgx/buildenv.mk LINUX_SGX_BUILD ?= 0 EMPTY_SRC = check_lvi_toolset -.PHONY: sgxssl sgxssl_no_mitigation clean install uninstall +.PHONY: sgxssl clean install uninstall -all: sgxssl - -sgxssl: +all: @rm -rf $(EMPTY_SRC).* && touch $(EMPTY_SRC).cpp @gcc -Wa,-mlfence-after-load=yes -c $(EMPTY_SRC).cpp 2> /dev/null \ || (echo "Please follow the instruction at https://github.com/intel/linux-sgx/blob/master/README.md#build-the-intelr-sgx-sdk-and-intelr-sgx-psw-package to install \"mitigation tools\" first." && exit 1) @@ -49,7 +47,7 @@ sgxssl: $(MAKE) -C sgx/ clean $(MAKE) -C sgx/ -sgxssl_no_mitigation: +sgxssl: $(MAKE) -C sgx/ all clean: From bae18ac7de0ca13d6e8405204aae46ce2c0c0c29 Mon Sep 17 00:00:00 2001 From: Jing He Date: Fri, 12 Aug 2022 00:29:05 -0400 Subject: [PATCH 2/3] update Signed-off-by: Jing He --- Linux/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linux/Makefile b/Linux/Makefile index ed6fcf64..003d3a3a 100644 --- a/Linux/Makefile +++ b/Linux/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2011-2017 Intel Corporation. All rights reserved. +# Copyright (C) 2011-2022 Intel Corporation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions From 75e370e8f2687225cd268c5432e523b3051b6d34 Mon Sep 17 00:00:00 2001 From: Jing He Date: Fri, 12 Aug 2022 02:15:30 -0400 Subject: [PATCH 3/3] backward compatibility Signed-off-by: Jing He --- Linux/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Linux/Makefile b/Linux/Makefile index 003d3a3a..dcb7dd61 100644 --- a/Linux/Makefile +++ b/Linux/Makefile @@ -32,7 +32,7 @@ include buildenv.mk include sgx/buildenv.mk LINUX_SGX_BUILD ?= 0 EMPTY_SRC = check_lvi_toolset -.PHONY: sgxssl clean install uninstall +.PHONY: sgxssl sgxssl_no_mitigation clean install uninstall all: @@ -50,6 +50,8 @@ all: sgxssl: $(MAKE) -C sgx/ all +sgxssl_no_mitigation:sgxssl + clean: $(MAKE) -C sgx/ clean rm -rf $(PACKAGE_LIB)/$(OPENSSL_LIB) $(PACKAGE_INC)/openssl/