From 96d46510d1ca0c25ca26541c3a5d87d3c5c18c29 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 25 May 2024 14:35:16 +0100 Subject: [PATCH] temporary CI update --- .github/workflows/ci.yml | 2 +- src/sys/prctl.rs | 6 +++--- test/sys/test_prctl.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed51548a7a..52b1dc2251 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,7 +73,7 @@ jobs: # Use cross for QEMU-based testing # cross needs to execute Docker, GitHub Action already has it installed cross: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest needs: [rustfmt, minver, macos, linux_native_builds, rust_stable] strategy: fail-fast: false diff --git a/src/sys/prctl.rs b/src/sys/prctl.rs index daeb41c788..94b09df3b4 100644 --- a/src/sys/prctl.rs +++ b/src/sys/prctl.rs @@ -219,10 +219,10 @@ pub fn get_thp_disable() -> Result { /// Set an identifier (or reset it) to the address memory range. pub fn set_vma_anon_name(addr: NonNull, length: NonZeroUsize, name: Option<&CStr>) -> Result<()> { let nameref = match name { - Some(n) => n.as_ptr() as u64, - _ => 0u64 + Some(n) => n.as_ptr() as usize, + _ => 0 }; - let res = unsafe { libc::prctl(libc::PR_SET_VMA, libc::PR_SET_VMA_ANON_NAME, addr.as_ptr() as u64, length, nameref) }; + let res = unsafe { libc::prctl(libc::PR_SET_VMA, libc::PR_SET_VMA_ANON_NAME, addr.as_ptr() as usize, length, nameref) }; Errno::result(res).map(drop) } diff --git a/test/sys/test_prctl.rs b/test/sys/test_prctl.rs index b409735af6..0bd3960cb5 100644 --- a/test/sys/test_prctl.rs +++ b/test/sys/test_prctl.rs @@ -135,8 +135,8 @@ mod test_prctl { mman::mmap_anonymous( None, sz, - mman::ProtFlags::PROT_READ, - mman::MapFlags::MAP_SHARED, + mman::ProtFlags::PROT_READ | mman::ProtFlags::PROT_WRITE, + mman::MapFlags::MAP_PRIVATE, ) .unwrap() };