-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial merge for capability systems
FreeBSD data sections are scanned for roots and capability tags are retained. During the mark phase, capability metadata is checked and capability addresses are adjusted to ensure they are within bounds and have valid tags. If the 'anchor' capability (the root pointer from which the pointer used to scan is derived from - *current_p*) is already greater than the upper bounds, guard against the derived capability (*limit*) undershooting the 'root' capability and asserting. Changes specific to CHERI capability systems are conditionally compiled using the macro __CHERI_PURE_CAPABILITY__
- Loading branch information
Dejice Jacob
committed
Jul 27, 2021
1 parent
b104cdc
commit 8120c8b
Showing
9 changed files
with
164 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
set(CMAKE_SYSTEM_NAME Linux) | ||
|
||
# Default SDK path | ||
set(SDK "$ENV{HOME}/cheri/output/sdk" CACHE PATH "path to cheri SDK") | ||
|
||
# Set toolchain compilers | ||
set(CMAKE_C_COMPILER ${SDK}/bin/clang) | ||
set(CMAKE_CXX_COMPILER ${SDK}/bin/clang++) | ||
|
||
# Don't run the linker on compiler check | ||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) | ||
|
||
# Use only cross compiler tools for compilation and linking | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
|
||
# Set correct machine and abi flags | ||
add_compile_options(--config cheribsd-riscv64-purecap.cfg) | ||
add_link_options(-fuse-ld=lld --config cheribsd-riscv64-purecap.cfg) |