-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(feat): Add memfd secret based allocation (#16)
* (feat): Add memfd secret style allocation * Fix error on compilation on non-linux targets * Review changes: move to another file, add tests, add behind feature * Review changes: alloc_ext deps in test, reorganize allocext * Apply review suggestion * Fuzz test findings- close fd when freeing * Sanity check tests: add tests to probe changes in guard_pages, canary * Add memfd secret bench * Review: Add memzero on free, assert unprotected_size + fd <= PAGE_SIZE * Review: Match memzero to only erase unprotected memory * Remove/add lints for CI * Missed file: Remove lint for CI * Ignore incompatible tests on Windows CI * Move malloc test to differnet files, allow lint for CI pass * Move malloc test to different file * Make Linux CI pass
- Loading branch information
1 parent
bbc6479
commit 3ee1311
Showing
14 changed files
with
708 additions
and
98 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,10 @@ version = "0.6.3" | |
authors = ["quininer kel <[email protected]>"] | ||
description = "Rust implementation `libsodium/utils`." | ||
repository = "https://github.com/quininer/memsec" | ||
keywords = [ "protection", "memory", "secure" ] | ||
keywords = ["protection", "memory", "secure"] | ||
documentation = "https://docs.rs/memsec/" | ||
license = "MIT" | ||
categories = [ "no-std", "memory-management" ] | ||
categories = ["no-std", "memory-management"] | ||
edition = "2018" | ||
|
||
[badges] | ||
|
@@ -22,14 +22,15 @@ libc = { version = "0.2", optional = true } | |
|
||
[target.'cfg(windows)'.dependencies] | ||
windows-sys = { version = "0.45", default-features = false, features = [ | ||
"Win32_System_SystemInformation", | ||
"Win32_System_Memory", | ||
"Win32_Foundation", | ||
"Win32_System_Diagnostics_Debug" | ||
"Win32_System_SystemInformation", | ||
"Win32_System_Memory", | ||
"Win32_Foundation", | ||
"Win32_System_Diagnostics_Debug", | ||
], optional = true } | ||
|
||
[features] | ||
default = [ "use_os", "alloc" ] | ||
default = ["use_os", "alloc"] | ||
nightly = [] | ||
use_os = [ "libc", "windows-sys" ] | ||
alloc = [ "getrandom", "use_os" ] | ||
use_os = ["libc", "windows-sys"] | ||
alloc = ["getrandom", "use_os"] | ||
alloc_ext = ["alloc"] |
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
Oops, something went wrong.