git clone https://github.com/cssl-unist/trust-sec23.gitMake sure you have installed the dependencies:
python3 or 2.7git- A C compiler (when building for the host,
ccis enough; cross-compiling may need additional compilers) curl(not needed on Windows)pkg-configif you are compiling on Linux and targeting Linuxninja, or GNUmake3.81 or later (Ninja is recommended, especially on Windows)libiconv(already included with glibc on Debian-based distros)cmake3.13.4 or laterlibstdc++-staticmay be required on some Linux distributions such as Fedora and Ubuntu
cd TRust cd rust ./x.py build && ./x.py install rustup toolchain link trust ./build rustup default trustcd ../mpk-mimalloc ./build.shcd ../ . ./setup.shEnvironment variables set-up is required for both building the framework and running benchmarks
cd $PRJHOME/mpk-library ./build.shcd $PRJHOME/mpk-rust-demangle cargo build --lib cargo build --lib --releasecd $PRJHOME/mpk-svf . ./build.shcd $PRJHOME/benchmarks/base64 ./build.sh cd target/release/deps LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./benchmarks-b37d04cee6b6da39 --benchhash of the executable may vary (the executable may not exactly be benchmarks-b37d04cee6b6da39)
cd $PRJHOME/benchmarks/regex/bench ./build.sh cd ../target/release/deps LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./benchmarks-b37d04cee6b6da39 --benchcd $PRJHOME/benchmarks/std ./build.sh cd target/release/deps LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./collectionsbenches-949558e15ed0a833 --bench -- vec LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./collectionsbenches-949558e15ed0a833 --bench -- string LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./collectionsbenches-949558e15ed0a833 --bench -- linked-list LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./collectionsbenches-949558e15ed0a833 --bench -- vec-deque LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./collectionsbenches-949558e15ed0a833 --bench -- btree hash of the executable may vary
cd $PRJHOME/benchmarks/hyper ./build.sh cd target/release/deps LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./body-ecce9aa8ef6e888b --bench LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./connect-43bd2033fb0ad8f9 --bench LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./end_to_end-65c04f5871934fc8 --bench LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./pipeline-fc359c99b71e3a82 --bench LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./server-6050495059813025 --benchhash of the executable may vary
cd $PRJHOME/benchmarks/tokio ./build.sh cd target/release/deps LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./sync_rwlock-76771b161ead33bd --bench LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./sync_semaphore-0fc9b6fec82f8c59 --bench LD_PRELOAD=$PRJHOME/mpk-library/build/libmpk.so ./signal-9123367a9386d186 --benchIf you are experiencing any issues with building the project or just want to run the benchmarks, please find the built version at our docker repository. You can install docker and run:
docker pull kayondo/trustPlease note that the image size is a bit large, requiring at least 17GB of disk space.
- Inyoung Bang (Seoul National University) iybang@sor.snu.ac.kr
- Martin Kayondo (Seoul National University) kymartin@sor.snu.ac.kr
- Hyungon Moon (UNIST) hyungon@unist.ac.kr
- Yunheung Paek (Seoul National University) ypaek@snu.ac.kr
@inproceedings {287352, author = {Inyoung Bang and Martin Kayondo and HyunGon Moon and Yunheung Paek}, title = {{TRust}: A Compilation Framework for In-process Isolation to Protect Safe Rust against Untrusted Code}, booktitle = {32nd USENIX Security Symposium (USENIX Security 23)}, year = {2023}, isbn = {978-1-939133-37-3}, address = {Anaheim, CA}, pages = {6947--6964}, url = {https://www.usenix.org/conference/usenixsecurity23/presentation/bang}, publisher = {USENIX Association}, month = aug }