Repository: bytecodealliance/wasmtime
Pull request #7789 (2024-01-18 01:46:15)

mpk: restore PKRU state when a fiber resumes execution
Previously, when a fiber was suspended, other computation could change the PKRU state on the current CPU. This means that the fiber could be resumed with a different PKRU state. This could be bad, resulting in situations in which the fiber can access more memory slots than it should or cannot even access its own memory slots.

This change saves the PKRU state prior to a fiber being suspended. When the fiber resumes execution, that PKRU state is restored.


abrown: This probably needs an `async_functions.rs` test but I'm still struggling on how to craft a scenario that checks for this issue.
github-actions[bot]: #### Subscribe to Label Action

cc @peterhuene

<details>
This issue or pull request has been labeled: "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

* peterhuene: wasmtime:api

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

[Learn more.](https://github.com/bytecodealliance/subscribe-to-label-action)
</details>

Patch:
diff --git a/cranelift/jit/src/backend.rs b/cranelift/jit/src/backend.rs
index f04b89d84..631a646bb 100644
--- a/cranelift/jit/src/backend.rs
+++ b/cranelift/jit/src/backend.rs
@@ -851,7 +851,11 @@ impl Module for JITModule {
         } = data;
 
         let size = init.size();
-        let ptr = if decl.writable {
+        let ptr = if size == 0 {
+            // Return a correctly aligned non-null pointer to avoid UB in write_bytes and
+            // copy_nonoverlapping.
+            usize::try_from(align.unwrap_or(WRITABLE_DATA_ALIGNMENT)).unwrap() as *mut u8
+        } else if decl.writable {
             self.memory
                 .writable
                 .allocate(size, align.unwrap_or(WRITABLE_DATA_ALIGNMENT))
@@ -869,6 +873,17 @@ impl Module for JITModule {
                 })?
         };
 
+        if ptr.is_null() {
+            // FIXME pass a Layout to allocate and only compute the layout once.
+            std::alloc::handle_alloc_error(
+                std::alloc::Layout::from_size_align(
+                    size,
+                    align.unwrap_or(READONLY_DATA_ALIGNMENT).try_into().unwrap(),
+                )
+                .unwrap(),
+            );
+        }
+
         match *init {
             Init::Uninitialized => {
                 panic!("data is not initialized yet");
diff --git a/crates/runtime/src/mpk/disabled.rs b/crates/runtime/src/mpk/disabled.rs
index 7f6de55bc..fbfd95e08 100644
--- a/crates/runtime/src/mpk/disabled.rs
+++ b/crates/runtime/src/mpk/disabled.rs
@@ -13,6 +13,10 @@ pub fn keys(_: usize) -> &'static [ProtectionKey] {
 }
 pub fn allow(_: ProtectionMask) {}
 
+pub fn current_mask() -> ProtectionMask {
+    ProtectionMask
+}
+
 #[derive(Clone, Copy, Debug)]
 pub enum ProtectionKey {}
 impl ProtectionKey {
diff --git a/crates/runtime/src/mpk/enabled.rs b/crates/runtime/src/mpk/enabled.rs
index 19827532c..792b35de0 100644
--- a/crates/runtime/src/mpk/enabled.rs
+++ b/crates/runtime/src/mpk/enabled.rs
@@ -59,6 +59,11 @@ pub fn allow(mask: ProtectionMask) {
     log::trace!("PKRU change: {:#034b} => {:#034b}", previous, pkru::read());
 }
 
+/// Retrieve the current protection mask.
+pub fn current_mask() -> ProtectionMask {
+    ProtectionMask(pkru::read())
+}
+
 /// An MPK protection key.
 ///
 /// The expected usage is:
diff --git a/crates/runtime/src/mpk/mod.rs b/crates/runtime/src/mpk/mod.rs
index f60b3880b..55f822aa5 100644
--- a/crates/runtime/src/mpk/mod.rs
+++ b/crates/runtime/src/mpk/mod.rs
@@ -34,10 +34,10 @@ cfg_if::cfg_if! {
         mod enabled;
         mod pkru;
         mod sys;
-        pub use enabled::{allow, is_supported, keys, ProtectionKey, ProtectionMask};
+        pub use enabled::{allow, current_mask, is_supported, keys, ProtectionKey, ProtectionMask};
     } else {
         mod disabled;
-        pub use disabled::{allow, is_supported, keys, ProtectionKey, ProtectionMask};
+        pub use disabled::{allow, current_mask, is_supported, keys, ProtectionKey, ProtectionMask};
     }
 }
 
diff --git a/crates/wasmtime/src/runtime/store.rs b/crates/wasmtime/src/runtime/store.rs
index 0854c1315..db9d917b6 100644
--- a/crates/wasmtime/src/runtime/store.rs
+++ b/crates/wasmtime/src/runtime/store.rs
@@ -95,10 +95,11 @@ use std::ptr;
 use std::sync::atomic::AtomicU64;
 use std::sync::Arc;
 use std::task::{Context, Poll};
+use wasmtime_runtime::mpk::{self, ProtectionKey, ProtectionMask};
 use wasmtime_runtime::{
-    mpk::ProtectionKey, ExportGlobal, InstanceAllocationRequest, InstanceAllocator, InstanceHandle,
-    ModuleInfo, OnDemandInstanceAllocator, SignalHandler, StoreBox, StorePtr, VMContext,
-    VMExternRef, VMExternRefActivationsTable, VMFuncRef, VMRuntimeLimits, WasmFault,
+    ExportGlobal, InstanceAllocationRequest, InstanceAllocator, InstanceHandle, ModuleInfo,
+    OnDemandInstanceAllocator, SignalHandler, StoreBox, StorePtr, VMContext, VMExternRef,
+    VMExternRefActivationsTable, VMFuncRef, VMRuntimeLimits, WasmFault,
 };
 
 mod context;
@@ -1401,6 +1402,7 @@ impl StoreOpaque {
         Some(AsyncCx {
             current_suspend: self.async_state.current_suspend.get(),
             current_poll_cx: poll_cx_box_ptr,
+            track_pkey_context_switch: mpk::is_supported() && self.pkey.is_some(),
         })
     }
 
@@ -1938,6 +1940,7 @@ impl<T> StoreContextMut<'_, T> {
 pub struct AsyncCx {
     current_suspend: *mut *const wasmtime_fiber::Suspend<Result<()>, (), Result<()>>,
     current_poll_cx: *mut *mut Context<'static>,
+    track_pkey_context_switch: bool,
 }
 
 #[cfg(feature = "async")]
@@ -1998,7 +2001,21 @@ impl AsyncCx {
                 Poll::Pending => {}
             }
 
+            // In order to prevent this fiber's MPK state from being munged by
+            // other fibers while it is suspended, we save and restore it once
+            // once execution resumes. Note that when MPK is not supported,
+            // these are noops.
+            let previous_mask = if self.track_pkey_context_switch {
+                let previous_mask = mpk::current_mask();
+                mpk::allow(ProtectionMask::all());
+                previous_mask
+            } else {
+                ProtectionMask::all()
+            };
             (*suspend).suspend(())?;
+            if self.track_pkey_context_switch {
+                mpk::allow(previous_mask);
+            }
         }
     }
 }
diff --git a/supply-chain/imports.lock b/supply-chain/imports.lock
index d1e9fe4ef..25456a8db 100644
--- a/supply-chain/imports.lock
+++ b/supply-chain/imports.lock
@@ -1,393 +1,193 @@
 
 # cargo-vet imports lock
 
-[[unpublished.cranelift]]
-version = "0.105.0"
-audited_as = "0.104.0"
-
 [[unpublished.cranelift]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-bforest]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-bforest]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-codegen]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-codegen]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-codegen-meta]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-codegen-meta]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-codegen-shared]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-codegen-shared]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-control]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-control]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-entity]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-entity]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-frontend]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-frontend]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-interpreter]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-interpreter]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-isle]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-isle]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-jit]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-jit]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-module]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-module]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-native]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-native]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-object]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-object]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-reader]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-reader]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-serde]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-serde]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.cranelift-wasm]]
-version = "0.105.0"
-audited_as = "0.104.0"
+audited_as = "0.104.1"
 
 [[unpublished.cranelift-wasm]]
 version = "0.106.0"
-audited_as = "0.104.0"
-
-[[unpublished.wasi-cap-std-sync]]
-version = "18.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasi-cap-std-sync]]
-version = "19.0.0"
-audited_as = "17.0.0"
+audited_as = "0.104.1"
 
 [[unpublished.wasi-common]]
-version = "18.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasi-common]]
-version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasi-tokio]]
-version = "18.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasi-tokio]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-asm-macros]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-asm-macros]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-cache]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-cache]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-cli]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-cli]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-cli-flags]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-cli-flags]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-component-macro]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-component-macro]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-component-util]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-component-util]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-cranelift]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-cranelift]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-cranelift-shared]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-cranelift-shared]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-environ]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-environ]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-explorer]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-explorer]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-fiber]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-fiber]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-jit-debug]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-jit-debug]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-jit-icache-coherence]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-jit-icache-coherence]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-runtime]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-runtime]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-types]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-types]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-wasi]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-wasi]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-wasi-http]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-wasi-http]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-wasi-nn]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-wasi-nn]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-wasi-threads]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-wasi-threads]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-wast]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-wast]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-winch]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-winch]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-wit-bindgen]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-wit-bindgen]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wasmtime-wmemcheck]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wasmtime-wmemcheck]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wiggle]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wiggle]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wiggle-generate]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wiggle-generate]]
 version = "19.0.0"
-audited_as = "17.0.0"
-
-[[unpublished.wiggle-macro]]
-version = "18.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wiggle-macro]]
 version = "19.0.0"
-audited_as = "17.0.0"
+audited_as = "17.0.1"
 
 [[unpublished.wiggle-test]]
 version = "0.0.0"
 audited_as = "0.1.0"
 
-[[unpublished.winch-codegen]]
-version = "0.16.0"
-audited_as = "0.15.0"
-
 [[unpublished.winch-codegen]]
 version = "0.17.0"
-audited_as = "0.15.0"
+audited_as = "0.15.1"
 
 [[publisher.aho-corasick]]
 version = "1.0.2"
@@ -480,13 +280,6 @@ user-id = 189
 user-login = "BurntSushi"
 user-name = "Andrew Gallant"
 
-[[publisher.cap-fs-ext]]
-version = "2.0.1"
-when = "2024-01-02"
-user-id = 6825
-user-login = "sunfishcode"
-user-name = "Dan Gohman"
-
 [[publisher.cap-fs-ext]]
 version = "3.0.0"
 when = "2024-01-11"
@@ -494,13 +287,6 @@ user-id = 6825
 user-login = "sunfishcode"
 user-name = "Dan Gohman"
 
-[[publisher.cap-net-ext]]
-version = "2.0.1"
-when = "2024-01-02"
-user-id = 6825
-user-login = "sunfishcode"
-user-name = "Dan Gohman"
-
 [[publisher.cap-net-ext]]
 version = "3.0.0"
 when = "2024-01-11"
@@ -508,13 +294,6 @@ user-id = 6825
 user-login = "sunfishcode"
 user-name = "Dan Gohman"
 
-[[publisher.cap-primitives]]
-version = "2.0.1"
-when = "2024-01-02"
-user-id = 6825
-user-login = "sunfishcode"
-user-name = "Dan Gohman"
-
 [[publisher.cap-primitives]]
 version = "3.0.0"
 when = "2024-01-11"
@@ -522,13 +301,6 @@ user-id = 6825
 user-login = "sunfishcode"
 user-name = "Dan Gohman"
 
-[[publisher.cap-rand]]
-version = "2.0.1"
-when = "2024-01-02"
-user-id = 6825
-user-login = "sunfishcode"
-user-name = "Dan Gohman"
-
 [[publisher.cap-rand]]
 version = "3.0.0"
 when = "2024-01-11"
@@ -536,13 +308,6 @@ user-id = 6825
 user-login = "sunfishcode"
 user-name = "Dan Gohman"
 
-[[publisher.cap-std]]
-version = "2.0.1"
-when = "2024-01-02"
-user-id = 6825
-user-login = "sunfishcode"
-user-name = "Dan Gohman"
-
 [[publisher.cap-std]]
 version = "3.0.0"
 when = "2024-01-11"
@@ -550,13 +315,6 @@ user-id = 6825
 user-login = "sunfishcode"
 user-name = "Dan Gohman"
 
-[[publisher.cap-time-ext]]
-version = "2.0.1"
-when = "2024-01-02"
-user-id = 6825
-user-login = "sunfishcode"
-user-name = "Dan Gohman"
-
 [[publisher.cap-time-ext]]
 version = "3.0.0"
 when = "2024-01-11"
@@ -600,104 +358,104 @@ user-login = "jrmuizel"
 user-name = "Jeff Muizelaar"
 
 [[publisher.cranelift]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-bforest]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-codegen]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-codegen-meta]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-codegen-shared]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-control]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-entity]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-frontend]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-interpreter]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-isle]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-jit]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-module]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-native]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-object]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-reader]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-serde]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.cranelift-wasm]]
-version = "0.104.0"
-when = "2024-01-25"
+version = "0.104.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
@@ -771,13 +529,6 @@ user-id = 6825
 user-login = "sunfishcode"
 user-name = "Dan Gohman"
 
-[[publisher.io-lifetimes]]
-version = "2.0.2"
-when = "2023-06-30"
-user-id = 6825
-user-login = "sunfishcode"
-user-name = "Dan Gohman"
-
 [[publisher.io-lifetimes]]
 version = "2.0.3"
 when = "2023-12-01"
@@ -883,13 +634,6 @@ user-id = 189
 user-login = "BurntSushi"
 user-name = "Andrew Gallant"
 
-[[publisher.rustix]]
-version = "0.38.28"
-when = "2023-12-09"
-user-id = 6825
-user-login = "sunfishcode"
-user-name = "Dan Gohman"
-
 [[publisher.rustix]]
 version = "0.38.31"
 when = "2024-02-01"
@@ -966,13 +710,6 @@ user-id = 3618
 user-login = "dtolnay"
 user-name = "David Tolnay"
 
-[[publisher.system-interface]]
-version = "0.26.1"
-when = "2024-01-02"
-user-id = 6825
-user-login = "sunfishcode"
-user-name = "Dan Gohman"
-
 [[publisher.system-interface]]
 version = "0.27.1"
 when = "2024-02-13"
@@ -980,13 +717,6 @@ user-id = 6825
 user-login = "sunfishcode"
 user-name = "Dan Gohman"
 
-[[publisher.target-lexicon]]
-version = "0.12.12"
-when = "2023-10-19"
-user-id = 6825
-user-login = "sunfishcode"
-user-name = "Dan Gohman"
-
 [[publisher.target-lexicon]]
 version = "0.12.13"
 when = "2024-01-02"
@@ -1065,8 +795,8 @@ user-login = "BurntSushi"
 user-name = "Andrew Gallant"
 
 [[publisher.wasi-common]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
@@ -1105,20 +835,6 @@ user-id = 1
 user-login = "alexcrichton"
 user-name = "Alex Crichton"
 
-[[publisher.wasm-encoder]]
-version = "0.38.1"
-when = "2023-11-29"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
-[[publisher.wasm-encoder]]
-version = "0.41.0"
-when = "2024-01-29"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
 [[publisher.wasm-encoder]]
 version = "0.41.2"
 when = "2024-02-12"
@@ -1126,13 +842,6 @@ user-id = 1
 user-login = "alexcrichton"
 user-name = "Alex Crichton"
 
-[[publisher.wasm-metadata]]
-version = "0.10.17"
-when = "2024-01-29"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
 [[publisher.wasm-metadata]]
 version = "0.10.20"
 when = "2024-02-12"
@@ -1140,13 +849,6 @@ user-id = 1
 user-login = "alexcrichton"
 user-name = "Alex Crichton"
 
-[[publisher.wasm-mutate]]
-version = "0.2.46"
-when = "2024-01-29"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
 [[publisher.wasm-mutate]]
 version = "0.2.48"
 when = "2024-02-12"
@@ -1154,13 +856,6 @@ user-id = 1
 user-login = "alexcrichton"
 user-name = "Alex Crichton"
 
-[[publisher.wasm-smith]]
-version = "0.15.1"
-when = "2024-01-29"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
 [[publisher.wasm-smith]]
 version = "0.16.1"
 when = "2024-02-12"
@@ -1168,20 +863,6 @@ user-id = 1
 user-login = "alexcrichton"
 user-name = "Alex Crichton"
 
-[[publisher.wasmparser]]
-version = "0.118.1"
-when = "2023-11-29"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
-[[publisher.wasmparser]]
-version = "0.121.0"
-when = "2024-01-29"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
 [[publisher.wasmparser]]
 version = "0.121.2"
 when = "2024-02-12"
@@ -1189,13 +870,6 @@ user-id = 1
 user-login = "alexcrichton"
 user-name = "Alex Crichton"
 
-[[publisher.wasmprinter]]
-version = "0.2.78"
-when = "2024-01-29"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
 [[publisher.wasmprinter]]
 version = "0.2.80"
 when = "2024-02-12"
@@ -1204,156 +878,149 @@ user-login = "alexcrichton"
 user-name = "Alex Crichton"
 
 [[publisher.wasmtime]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-asm-macros]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-cache]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-cli]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-cli-flags]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-component-macro]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-component-util]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-cranelift]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-cranelift-shared]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-environ]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-explorer]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-fiber]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-jit-debug]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-jit-icache-coherence]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-runtime]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-types]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-wasi]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-wasi-http]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-wasi-nn]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-wasi-threads]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-wast]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-winch]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-wit-bindgen]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wasmtime-wmemcheck]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
-[[publisher.wast]]
-version = "70.0.2"
-when = "2024-01-29"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
 [[publisher.wast]]
 version = "71.0.1"
 when = "2024-02-12"
@@ -1361,13 +1028,6 @@ user-id = 1
 user-login = "alexcrichton"
 user-name = "Alex Crichton"
 
-[[publisher.wat]]
-version = "1.0.85"
-when = "2024-01-29"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
 [[publisher.wat]]
 version = "1.0.88"
 when = "2024-02-12"
@@ -1376,20 +1036,20 @@ user-login = "alexcrichton"
 user-name = "Alex Crichton"
 
 [[publisher.wiggle]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wiggle-generate]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
 [[publisher.wiggle-macro]]
-version = "17.0.0"
-when = "2024-01-25"
+version = "17.0.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
@@ -1408,18 +1068,11 @@ user-login = "BurntSushi"
 user-name = "Andrew Gallant"
 
 [[publisher.winch-codegen]]
-version = "0.15.0"
-when = "2024-01-25"
+version = "0.15.1"
+when = "2024-02-07"
 user-id = 73222
 user-login = "wasmtime-publish"
 
-[[publisher.windows-core]]
-version = "0.51.1"
-when = "2023-08-17"
-user-id = 64539
-user-login = "kennykerr"
-user-name = "Kenny Kerr"
-
 [[publisher.windows-core]]
 version = "0.52.0"
 when = "2023-11-15"
@@ -1448,13 +1101,6 @@ user-id = 64539
 user-login = "kennykerr"
 user-name = "Kenny Kerr"
 
-[[publisher.windows-targets]]
-version = "0.48.5"
-when = "2023-08-18"
-user-id = 64539
-user-login = "kennykerr"
-user-name = "Kenny Kerr"
-
 [[publisher.windows-targets]]
 version = "0.52.0"
 when = "2023-11-15"
@@ -1469,13 +1115,6 @@ user-id = 64539
 user-login = "kennykerr"
 user-name = "Kenny Kerr"
 
-[[publisher.windows_aarch64_gnullvm]]
-version = "0.48.5"
-when = "2023-08-18"
-user-id = 64539
-user-login = "kennykerr"
-user-name = "Kenny Kerr"
-
 [[publisher.windows_aarch64_gnullvm]]
 version = "0.52.0"
 when = "2023-11-15"
@@ -1490,13 +1129,6 @@ user-id = 64539
 user-login = "kennykerr"
 user-name = "Kenny Kerr"
 
-[[publisher.windows_aarch64_msvc]]
-version = "0.48.5"
-when = "2023-08-18"
-user-id = 64539
-user-login = "kennykerr"
-user-name = "Kenny Kerr"
-
 [[publisher.windows_aarch64_msvc]]
 version = "0.52.0"
 when = "2023-11-15"
@@ -1511,13 +1143,6 @@ user-id = 64539
 user-login = "kennykerr"
 user-name = "Kenny Kerr"
 
-[[publisher.windows_i686_gnu]]
-version = "0.48.5"
-when = "2023-08-18"
-user-id = 64539
-user-login = "kennykerr"
-user-name = "Kenny Kerr"
-
 [[publisher.windows_i686_gnu]]
 version = "0.52.0"
 when = "2023-11-15"
@@ -1532,13 +1157,6 @@ user-id = 64539
 user-login = "kennykerr"
 user-name = "Kenny Kerr"
 
-[[publisher.windows_i686_msvc]]
-version = "0.48.5"
-when = "2023-08-18"
-user-id = 64539
-user-login = "kennykerr"
-user-name = "Kenny Kerr"
-
 [[publisher.windows_i686_msvc]]
 version = "0.52.0"
 when = "2023-11-15"
@@ -1553,13 +1171,6 @@ user-id = 64539
 user-login = "kennykerr"
 user-name = "Kenny Kerr"
 
-[[publisher.windows_x86_64_gnu]]
-version = "0.48.5"
-when = "2023-08-18"
-user-id = 64539
-user-login = "kennykerr"
-user-name = "Kenny Kerr"
-
 [[publisher.windows_x86_64_gnu]]
 version = "0.52.0"
 when = "2023-11-15"
@@ -1574,13 +1185,6 @@ user-id = 64539
 user-login = "kennykerr"
 user-name = "Kenny Kerr"
 
-[[publisher.windows_x86_64_gnullvm]]
-version = "0.48.5"
-when = "2023-08-18"
-user-id = 64539
-user-login = "kennykerr"
-user-name = "Kenny Kerr"
-
 [[publisher.windows_x86_64_gnullvm]]
 version = "0.52.0"
 when = "2023-11-15"
@@ -1595,13 +1199,6 @@ user-id = 64539
 user-login = "kennykerr"
 user-name = "Kenny Kerr"
 
-[[publisher.windows_x86_64_msvc]]
-version = "0.48.5"
-when = "2023-08-18"
-user-id = 64539
-user-login = "kennykerr"
-user-name = "Kenny Kerr"
-
 [[publisher.windows_x86_64_msvc]]
 version = "0.52.0"
 when = "2023-11-15"
@@ -1623,13 +1220,6 @@ user-id = 6825
 user-login = "sunfishcode"
 user-name = "Dan Gohman"
 
-[[publisher.wit-bindgen]]
-version = "0.15.0"
-when = "2023-11-27"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
 [[publisher.wit-bindgen]]
 version = "0.17.0"
 when = "2024-02-05"
@@ -1637,13 +1227,6 @@ user-id = 1
 user-login = "alexcrichton"
 user-name = "Alex Crichton"
 
-[[publisher.wit-bindgen-core]]
-version = "0.15.0"
-when = "2023-11-27"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
 [[publisher.wit-bindgen-core]]
 version = "0.17.0"
 when = "2024-02-05"
@@ -1651,13 +1234,6 @@ user-id = 1
 user-login = "alexcrichton"
 user-name = "Alex Crichton"
 
-[[publisher.wit-bindgen-rust]]
-version = "0.15.0"
-when = "2023-11-27"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
 [[publisher.wit-bindgen-rust]]
 version = "0.17.0"
 when = "2024-02-05"
@@ -1665,13 +1241,6 @@ user-id = 1
 user-login = "alexcrichton"
 user-name = "Alex Crichton"
 
-[[publisher.wit-bindgen-rust-macro]]
-version = "0.15.0"
-when = "2023-11-27"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
 [[publisher.wit-bindgen-rust-macro]]
 version = "0.17.0"
 when = "2024-02-05"
@@ -1679,13 +1248,6 @@ user-id = 1
 user-login = "alexcrichton"
 user-name = "Alex Crichton"
 
-[[publisher.wit-component]]
-version = "0.18.2"
-when = "2023-11-20"
-user-id = 1
-user-login = "alexcrichton"
-user-name = "Alex Crichton"
-
 [[publisher.wit-component]]
 version = "0.20.1"
 when = "2024-01-29"
@@ -2318,12 +1880,6 @@ criteria = "safe-to-deploy"
 delta = "3.6.0 -> 3.8.0"
 aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
 
-[[audits.mozilla.audits.toml]]
-who = "Bobby Holley <bobbyholley@gmail.com>"
-criteria = "safe-to-deploy"
-delta = "0.5.7 -> 0.5.9"
-aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
-
 [[audits.mozilla.audits.unicode-normalization]]
 who = "Mike Hommey <mh+mozilla@glandium.org>"
 criteria = "safe-to-deploy"


Test patch:
diff --git a/cranelift/jit/tests/basic.rs b/cranelift/jit/tests/basic.rs
index a6e5a0464..4969b2cca 100644
--- a/cranelift/jit/tests/basic.rs
+++ b/cranelift/jit/tests/basic.rs
@@ -213,3 +213,27 @@ fn libcall_function() {
 
     module.finalize_definitions().unwrap();
 }
+
+// This used to cause UB. See https://github.com/bytecodealliance/wasmtime/issues/7918.
+#[test]
+fn empty_data_object() {
+    let mut flag_builder = settings::builder();
+    flag_builder.set("use_colocated_libcalls", "false").unwrap();
+    // FIXME set back to true once the x64 backend supports it.
+    flag_builder.set("is_pic", "false").unwrap();
+    let isa_builder = cranelift_native::builder().unwrap_or_else(|msg| {
+        panic!("host machine is not supported: {}", msg);
+    });
+    let isa = isa_builder
+        .finish(settings::Flags::new(flag_builder))
+        .unwrap();
+    let mut module = JITModule::new(JITBuilder::with_isa(isa, default_libcall_names()));
+
+    let data_id = module
+        .declare_data("empty", Linkage::Export, false, false)
+        .unwrap();
+
+    let mut data = DataDescription::new();
+    data.define(Box::new([]));
+    module.define_data(data_id, &data).unwrap();
+}
diff --git a/tests/all/async_functions.rs b/tests/all/async_functions.rs
index fdc643a34..73216fc29 100644
--- a/tests/all/async_functions.rs
+++ b/tests/all/async_functions.rs
@@ -389,6 +389,84 @@ async fn async_host_func_with_pooling_stacks() -> Result<()> {
     Ok(())
 }
 
+#[tokio::test]
+async fn async_mpk_protection() -> Result<()> {
+    let _ = env_logger::try_init();
+
+    // Construct a pool with MPK protection enabled; note that the MPK
+    // protection is configured in `small_pool_config`.
+    let mut pooling = crate::small_pool_config();
+    pooling
+        .total_memories(10)
+        .total_stacks(2)
+        .memory_pages(1)
+        .table_elements(0);
+    let mut config = Config::new();
+    config.async_support(true);
+    config.allocation_strategy(InstanceAllocationStrategy::Pooling(pooling));
+    config.static_memory_maximum_size(1 << 26);
+    config.epoch_interruption(true);
+    let engine = Engine::new(&config)?;
+
+    // Craft a module that loops for several iterations and checks whether it
+    // has access to its memory range (0x0-0x10000).
+    const WAT: &str = "
+    (module
+        (func $start
+            (local $i i32)
+            (local.set $i (i32.const 3))
+            (loop $cont
+                (drop (i32.load (i32.const 0)))
+                (drop (i32.load (i32.const 0xfffc)))
+                (br_if $cont (local.tee $i (i32.sub (local.get $i) (i32.const 1))))))
+        (memory 1)
+        (start $start))
+    ";
+
+    // Start two instances of the module in separate fibers, `a` and `b`.
+    async fn run_instance(engine: &Engine, name: &str) -> Instance {
+        let mut store = Store::new(&engine, ());
+        store.set_epoch_deadline(0);
+        store.epoch_deadline_async_yield_and_update(0);
+        let module = Module::new(store.engine(), WAT).unwrap();
+        println!("[{name}] building instance");
+        Instance::new_async(&mut store, &module, &[]).await.unwrap()
+    }
+    let mut a = Box::pin(run_instance(&engine, "a"));
+    let mut b = Box::pin(run_instance(&engine, "b"));
+
+    // Alternately poll each instance until completion. This should exercise
+    // fiber suspensions requiring the `Store` to appropriately save and restore
+    // the PKRU context between suspensions (see `AsyncCx::block_on`).
+    for i in 0..10 {
+        if i % 2 == 0 {
+            match PollOnce::new(a).await {
+                Ok(_) => {
+                    println!("[a] done");
+                    break;
+                }
+                Err(a_) => {
+                    println!("[a] not done");
+                    a = a_;
+                }
+            }
+        } else {
+            match PollOnce::new(b).await {
+                Ok(_) => {
+                    println!("[b] done");
+                    break;
+                }
+                Err(b_) => {
+                    println!("[b] not done");
+                    b = b_;
+                }
+            }
+        }
+    }
+
+    Ok(())
+}
+
 /// This will execute the `future` provided to completion and each invocation of
 /// `poll` for the future will be executed on a separate thread.
 pub async fn execute_across_threads<F>(future: F) -> F::Output