mirror of
https://github.com/rosenpass/rosenpass.git
synced 2025-12-05 20:40:02 -08:00
Implements: - An additional allocator to use memfd_secret(2) and guard pages using mmap(2), implemented in quininer/memsec#16 - An allocator that abstracts away underlying allocators, and uses specified allocator set by rosenpass_secret_memory::policy functions (or a function that sets rosenpass_secret_memory::alloc::ALLOC_INIT - Updates to tests- integration, fuzz, bench: some tests use procspawn to spawn multiple processes with different allocator policies
16 lines
347 B
Rust
16 lines
347 B
Rust
#![no_main]
|
|
|
|
use std::sync::Once;
|
|
|
|
use libfuzzer_sys::fuzz_target;
|
|
use rosenpass_secret_memory::alloc::secret_vec;
|
|
use rosenpass_secret_memory::policy::*;
|
|
|
|
static ONCE: Once = Once::new();
|
|
|
|
fuzz_target!(|data: &[u8]| {
|
|
ONCE.call_once(secret_policy_use_only_malloc_secrets);
|
|
let mut vec = secret_vec();
|
|
vec.extend_from_slice(data);
|
|
});
|