Skip to content

Commit

Permalink
Remove/add lints for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhpreet committed Jun 4, 2024
1 parent 1f143c2 commit 23e59ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/alloc/allocext/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use core::slice;
use self::memfd_secret_alloc::*;

mod memfd_secret_alloc {
use core::convert::TryInto;
use super::*;
use core::convert::TryInto;

#[inline]
pub unsafe fn alloc_memfd_secret(size: usize) -> Option<(NonNull<u8>, libc::c_int)> {
Expand Down Expand Up @@ -120,7 +120,7 @@ pub unsafe fn free_memfd_secret<T: ?Sized>(memptr: NonNull<T>) {
let total_size = PAGE_SIZE + PAGE_SIZE + unprotected_size + PAGE_SIZE;
_mprotect(base_ptr, total_size, Prot::ReadWrite);

crate::memzero(unprotected_ptr,unprotected_size);
crate::memzero(unprotected_ptr, unprotected_size);

let res = libc::munmap(base_ptr as *mut c_void, total_size);
if res < 0 {
Expand Down
1 change: 1 addition & 0 deletions src/alloc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ unsafe fn alloc_init() {

PAGE_MASK = PAGE_SIZE - 1;

#[allow(static_mut_refs)]
getrandom(&mut CANARY).unwrap();
}

Expand Down

0 comments on commit 23e59ef

Please sign in to comment.