mirror of
https://github.com/intel/linux-sgx
synced 2026-06-08 14:49:32 +00:00
e38040bb98
Note: Most of the original commit has merged except for applying 0001-Add-Wno-stringop-overflow.patch. Do we still need this? Signed-off-by: Zhang, Lili Z <lili.z.zhang@intel.com>
The ippcp library is built based on the IPP Cryptography open source project:
In order to build your own IPP crypto, please follow below steps:
- Download the prebuilt mitigation tools package
as.ld.objdump.{ver}.tar.gzfrom 01.org, extract the package and copy the tools to/usr/local/bin. - Read the ipp-crypto README to prepare your build environment.
- Make sure ipp-crypto source code is prepared.
- Build the target ippcp library with the prepared Makefile:
- Build the target ippcp library with All-Loads-Mitigation:
$ make MITIGATION-CVE-2020-0551=LOAD- Build the target ippcp library with Branch-Mitigation:
$ make MITIGATION-CVE-2020-0551=CF- Build the target ippcp library with No-Mitigation:
$ make
The built static library libippcp.a and header files will be copied into the right place.
Remember to "make clean" before switching the build.
For the IPP crypto reproducible build, please follow the instructions in reproducibility README.md to reproduce the prebuilt IPP crypto.
These are the steps to build the IPP Crypto-based dispatcher code after you built the library:
- Enter the IPP Crypto Custom Library Tool directory:
$ cd ./ipp-crypto/tools/ipp_custom_library_tool_python
- Generate the function list based on the ippcp.h:
$ awk -F\, '/IPPAPI\(/ {print $2}' ../../../inc/ippcp.h | awk '{print $1}' >functions.txt
- Use the Custom Library Tool to generate the dispatcher code:
$ python3 main.py -c -g -p ./ -ff functions.txt -arch intel64 -d sse42 avx2 avx512ifma -root ../../build/.build/RELEASE/ --prefix sgx_disp_
- (Optional) You can run below command to check whether the dispatcher code generated successfully:
$ ./build_custom_library_intel64.sh
- Copy the generated dispatcher code to the specific SDK directory:
$ cp custom_dispatcher/intel64/* ../../../../../sdk/tlibcrypto/ipp/ipp_disp/intel64/