andrewl6097 removed the review request for wasmtime-core-reviewers from PR #15357.
andrewl6097 opened PR #15357 from andrewl6097:aarch64-use-csdb-native to bytecodealliance:main:
use_csdbwas added in #12932 so embedders could opt back intocsdbon aarch64, butEngine::check_compatible_with_native_hostdoesn't know about it. With it enabled on an aarch64 host,Module::newand loading a precompiled module both fail withdon't know how to test for target-specific flag "use_csdb" at runtime, so the settingdocs/security.mdrecommends can't be used for native code.
CSDBis encoded in the hint space and runs as aNOPon CPUs that don't implement it, so this adds it next touse_btiamong the aarch64 flags that need no detection.The new test in
tests/all/module.rsruns only on aarch64. For bothuse_btianduse_csdb, it compiles a module with acall_indirect(a Spectre-guarded table access) and abr_table(a jump table), which are the two placesuse_csdbemitscsdb. It then calls the module through both paths, and serializes and deserializes it. I've only been able to run the module itself on x86-64 without the flags, so the aarch64 run is up to CI.Closes #(issue)
I'd like this backported to
release-51.0.0before 51.0.0. The commit cherry-picks onto it without conflicts.
andrewl6097 requested dicej for a review on PR #15357.
andrewl6097 requested wasmtime-core-reviewers for a review on PR #15357.
andrewl6097 edited PR #15357:
Hi - it appears that the spectre mitigation flag for aarch64 doesn't work; I haven't been able to find a case of it being used in the wild, but I do need it, and I was planning an upgrade from wasmtime 43 to 51 and discovered this issue. I was testing using the rc branch of 51. Since this is a small change that cherry-picks clean onto mainline - any chance that if it looks good, it could be rolled into the 51 release? (I understand if not; I'm just trying to avoid waiting another month :) )
use_csdbwas added in #12932 so embedders could opt back intocsdbon aarch64, butEngine::check_compatible_with_native_hostdoesn't know about it. With it enabled on an aarch64 host,Module::newand loading a precompiled module both fail withdon't know how to test for target-specific flag "use_csdb" at runtime, so the settingdocs/security.mdrecommends can't be used for native code.
CSDBis encoded in the hint space and runs as aNOPon CPUs that don't implement it, so this adds it next touse_btiamong the aarch64 flags that need no detection.The new test in
tests/all/module.rsruns only on aarch64. For bothuse_btianduse_csdb, it compiles a module with acall_indirect(a Spectre-guarded table access) and abr_table(a jump table), which are the two placesuse_csdbemitscsdb. It then calls the module through both paths, and serializes and deserializes it. I've only been able to run the module itself on x86-64 without the flags, so the aarch64 run is up to CI.Closes #(issue)
I'd like this backported to
release-51.0.0before 51.0.0. The commit cherry-picks onto it without conflicts.
This is outside my wheelhouse. @cfallin would you mind taking a look?
andrewl6097 edited PR #15357:
Hi - it appears that the spectre mitigation flag for aarch64 doesn't work; I haven't been able to find a case of it being used in the wild, but I do need it, and I was planning an upgrade from wasmtime 43 to 51 and discovered this issue. I was testing using the rc branch of 51. Since this is a small change that cherry-picks clean onto mainline - any chance that if it looks good, it could be rolled into the 51 release? (I understand if not; I'm just trying to avoid waiting another month :) )
use_csdbwas added in #12932 so embedders could opt back intocsdbon aarch64, butEngine::check_compatible_with_native_hostdoesn't know about it. With it enabled on an aarch64 host,Module::newand loading a precompiled module both fail withdon't know how to test for target-specific flag "use_csdb" at runtime, so the settingdocs/security.mdrecommends can't be used for native code.
CSDBis encoded in the hint space and runs as aNOPon CPUs that don't implement it, so this adds it next touse_btiamong the aarch64 flags that need no detection.The new test in
tests/all/module.rsruns only on aarch64. For bothuse_btianduse_csdb, it compiles a module with acall_indirect(a Spectre-guarded table access) and abr_table(a jump table), which are the two placesuse_csdbemitscsdb. It then calls the module through both paths, and serializes and deserializes it. I've only been able to run the module itself on x86-64 without the flags, so the aarch64 run is up to CI.Closes #(issue)
I'd like this backported to
release-51.0.0before 51.0.0. The commit cherry-picks onto it without conflicts.
andrewl6097 edited PR #15357:
Hi - it appears that the spectre mitigation flag for aarch64 doesn't work; I haven't been able to find a case of it being used in the wild, but I do need it, and I was planning an upgrade from wasmtime 43 to 51 and discovered this issue. I was testing using the rc branch of 51. Since this is a small change that cherry-picks clean onto mainline - any chance that if it looks good, it could be rolled into the 51 release? (I understand if not; I'm just trying to avoid waiting another month :) )
use_csdbwas added in #12932 so embedders could opt back intocsdbon aarch64, butEngine::check_compatible_with_native_hostdoesn't know about it. With it enabled on an aarch64 host,Module::newand loading a precompiled module both fail withdon't know how to test for target-specific flag "use_csdb" at runtime, so the settingdocs/security.mdrecommends can't be used for native code.
CSDBis encoded in the hint space and runs as aNOPon CPUs that don't implement it, so this adds it next touse_btiamong the aarch64 flags that need no detection.The new test in
tests/all/module.rsruns only on aarch64. For bothuse_btianduse_csdb, it compiles a module with acall_indirect(a Spectre-guarded table access) and abr_table(a jump table), which are the two placesuse_csdbemitscsdb. It then calls the module through both paths, and serializes and deserializes it. I've only been able to run the module itself on x86-64 without the flags, so the aarch64 run is up to CI.Closes #15356
I'd like this backported to
release-51.0.0before 51.0.0. The commit cherry-picks onto it without conflicts.
cfallin removed the review request for dicej from PR #15357.
cfallin requested cfallin for a review on PR #15357.
:thumbs_up: cfallin submitted PR review:
Thanks!
cfallin added PR #15357 Allow use_csdb when checking compatibility with the native host to the merge queue.
:check: cfallin merged PR #15357.
cfallin removed PR #15357 Allow use_csdb when checking compatibility with the native host from the merge queue.
Last updated: Nov 19 2026 at 20:05 UTC