andrewl6097 opened issue #15356:
Description
#12932 (44.0.0) stopped emitting
csdbon aarch64 by default and added the aarch64 Cranelift settinguse_csdbto opt back in.docs/security.mdpoints embedders to that setting. Enabling it, though, makesEngine::check_compatible_with_native_hostreject the engine, so no module can be compiled or loaded on an aarch64 host:compilation settings are not compatible with the native host Caused by: don't know how to test for target-specific flag "use_csdb" at runtime
Engine::newsucceeds. The error comes from the check thatModule::newandModule::deserialize*run first.Engine::precompile_moduledoesn't run it, so precompiling succeeds and loading the result fails. That check returnsOkfor target-specific flags that need no host support, such asuse_btiandsign_return_address*, and looks up the rest in the host's CPU features.use_csdbis on neither list, so it hits the final_arm. On 43.0.x and earlier there was no flag, andcsdbwas emitted whenever Spectre mitigations were on.Steps to reproduce
On any aarch64 Linux host:
let mut config = wasmtime::Config::new(); unsafe { config.cranelift_flag_enable("use_csdb"); } let engine = wasmtime::Engine::new(&config)?; wasmtime::Module::new(&engine, "(module)")?; // failsVersions
Affects 44.0.0 through 51.0.0-rc.1, and
mainat 7d316a1b6. We hit it on Amazon Linux 2 and 2023 (aarch64) with 51.0.0-rc.1.Expected
CSDBis encoded in the hint space and runs as aNOPon CPUs that don't implement it, so, likeuse_bti, it needs no host detection and should be accepted.I have a fix with a test ready and will open a PR for it. Since
use_csdbis the only way to getcsdbback on aarch64, could it go into 51.0.0 as well?
andrewl6097 edited issue #15356:
Description
#12932 (44.0.0) stopped emitting
csdbon aarch64 by default and added the aarch64 Cranelift settinguse_csdbto opt back in.docs/security.mdpoints embedders to that setting. Enabling it, though, makesEngine::check_compatible_with_native_hostreject the engine, so no module can be compiled or loaded on an aarch64 host:compilation settings are not compatible with the native host Caused by: don't know how to test for target-specific flag "use_csdb" at runtime
Engine::newsucceeds. The error comes from the check thatModule::newandModule::deserialize*run first.Engine::precompile_moduledoesn't run it, so precompiling succeeds and loading the result fails. That check returnsOkfor target-specific flags that need no host support, such asuse_btiandsign_return_address*, and looks up the rest in the host's CPU features.use_csdbis on neither list, so it hits the final_arm. On 43.0.x and earlier there was no flag, andcsdbwas emitted whenever Spectre mitigations were on.Steps to reproduce
On any aarch64 Linux host:
let mut config = wasmtime::Config::new(); unsafe { config.cranelift_flag_enable("use_csdb"); } let engine = wasmtime::Engine::new(&config)?; wasmtime::Module::new(&engine, "(module)")?; // failsVersions
Affects 44.0.0 through 51.0.0-rc.1, and
mainat 7d316a1b6. We hit it on Amazon Linux 2 and 2023 (aarch64) with 51.0.0-rc.1.Expected
CSDBis encoded in the hint space and runs as aNOPon CPUs that don't implement it, so, likeuse_bti, it needs no host detection and should be accepted.I have a fix with a test ready and have opened the PR https://github.com/bytecodealliance/wasmtime/pull/15357 . Since
use_csdbis the only way to getcsdbback on aarch64, could it go into 51.0.0 as well?
andrewl6097 edited issue #15356:
Description
#12932 (44.0.0) stopped emitting
csdbon aarch64 by default and added the aarch64 Cranelift settinguse_csdbto opt back in.docs/security.mdpoints embedders to that setting. Enabling it, though, makesEngine::check_compatible_with_native_hostreject the engine, so no module can be compiled or loaded on an aarch64 host:compilation settings are not compatible with the native host Caused by: don't know how to test for target-specific flag "use_csdb" at runtime
Engine::newsucceeds. The error comes from the check thatModule::newandModule::deserialize*run first.Engine::precompile_moduledoesn't run it, so precompiling succeeds and loading the result fails. That check returnsOkfor target-specific flags that need no host support, such asuse_btiandsign_return_address*, and looks up the rest in the host's CPU features.use_csdbis on neither list, so it hits the final_arm. On 43.0.x and earlier there was no flag, andcsdbwas emitted whenever Spectre mitigations were on.Steps to reproduce
On any aarch64 Linux host:
let mut config = wasmtime::Config::new(); unsafe { config.cranelift_flag_enable("use_csdb"); } let engine = wasmtime::Engine::new(&config)?; wasmtime::Module::new(&engine, "(module)")?; // failsVersions
Affects 44.0.0 through 51.0.0-rc.1, and
mainat 7d316a1b6. We hit it on Amazon Linux 2 and 2023 (aarch64) with 51.0.0-rc.1.Expected
CSDBis encoded in the hint space and runs as aNOPon CPUs that don't implement it, so, likeuse_bti, it needs no host detection and should be accepted.I have a fix with a test ready and have opened the PR https://github.com/bytecodealliance/wasmtime/pull/15357
cfallin closed issue #15356:
Description
#12932 (44.0.0) stopped emitting
csdbon aarch64 by default and added the aarch64 Cranelift settinguse_csdbto opt back in.docs/security.mdpoints embedders to that setting. Enabling it, though, makesEngine::check_compatible_with_native_hostreject the engine, so no module can be compiled or loaded on an aarch64 host:compilation settings are not compatible with the native host Caused by: don't know how to test for target-specific flag "use_csdb" at runtime
Engine::newsucceeds. The error comes from the check thatModule::newandModule::deserialize*run first.Engine::precompile_moduledoesn't run it, so precompiling succeeds and loading the result fails. That check returnsOkfor target-specific flags that need no host support, such asuse_btiandsign_return_address*, and looks up the rest in the host's CPU features.use_csdbis on neither list, so it hits the final_arm. On 43.0.x and earlier there was no flag, andcsdbwas emitted whenever Spectre mitigations were on.Steps to reproduce
On any aarch64 Linux host:
let mut config = wasmtime::Config::new(); unsafe { config.cranelift_flag_enable("use_csdb"); } let engine = wasmtime::Engine::new(&config)?; wasmtime::Module::new(&engine, "(module)")?; // failsVersions
Affects 44.0.0 through 51.0.0-rc.1, and
mainat 7d316a1b6. We hit it on Amazon Linux 2 and 2023 (aarch64) with 51.0.0-rc.1.Expected
CSDBis encoded in the hint space and runs as aNOPon CPUs that don't implement it, so, likeuse_bti, it needs no host detection and should be accepted.I have a fix with a test ready and have opened the PR https://github.com/bytecodealliance/wasmtime/pull/15357
Last updated: Nov 19 2026 at 20:05 UTC