Stream: git-wasmtime

Topic: wasmtime / PR #15357 Allow `use_csdb` when checking compa...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 21:18):

andrewl6097 removed the review request for wasmtime-core-reviewers from PR #15357.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 21:18):

andrewl6097 opened PR #15357 from andrewl6097:aarch64-use-csdb-native to bytecodealliance:main:

use_csdb was added in #12932 so embedders could opt back into csdb on aarch64, but Engine::check_compatible_with_native_host doesn't know about it. With it enabled on an aarch64 host, Module::new and loading a precompiled module both fail with don't know how to test for target-specific flag "use_csdb" at runtime, so the setting docs/security.md recommends can't be used for native code.

CSDB is encoded in the hint space and runs as a NOP on CPUs that don't implement it, so this adds it next to use_bti among the aarch64 flags that need no detection.

The new test in tests/all/module.rs runs only on aarch64. For both use_bti and use_csdb, it compiles a module with a call_indirect (a Spectre-guarded table access) and a br_table (a jump table), which are the two places use_csdb emits csdb. 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.0 before 51.0.0. The commit cherry-picks onto it without conflicts.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 21:18):

andrewl6097 requested dicej for a review on PR #15357.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 21:18):

andrewl6097 requested wasmtime-core-reviewers for a review on PR #15357.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 21:20):

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_csdb was added in #12932 so embedders could opt back into csdb on aarch64, but Engine::check_compatible_with_native_host doesn't know about it. With it enabled on an aarch64 host, Module::new and loading a precompiled module both fail with don't know how to test for target-specific flag "use_csdb" at runtime, so the setting docs/security.md recommends can't be used for native code.

CSDB is encoded in the hint space and runs as a NOP on CPUs that don't implement it, so this adds it next to use_bti among the aarch64 flags that need no detection.

The new test in tests/all/module.rs runs only on aarch64. For both use_bti and use_csdb, it compiles a module with a call_indirect (a Spectre-guarded table access) and a br_table (a jump table), which are the two places use_csdb emits csdb. 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.0 before 51.0.0. The commit cherry-picks onto it without conflicts.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 21:30):

dicej commented on PR #15357:

This is outside my wheelhouse. @cfallin would you mind taking a look?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 21:32):

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_csdb was added in #12932 so embedders could opt back into csdb on aarch64, but Engine::check_compatible_with_native_host doesn't know about it. With it enabled on an aarch64 host, Module::new and loading a precompiled module both fail with don't know how to test for target-specific flag "use_csdb" at runtime, so the setting docs/security.md recommends can't be used for native code.

CSDB is encoded in the hint space and runs as a NOP on CPUs that don't implement it, so this adds it next to use_bti among the aarch64 flags that need no detection.

The new test in tests/all/module.rs runs only on aarch64. For both use_bti and use_csdb, it compiles a module with a call_indirect (a Spectre-guarded table access) and a br_table (a jump table), which are the two places use_csdb emits csdb. 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.0 before 51.0.0. The commit cherry-picks onto it without conflicts.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 21:33):

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_csdb was added in #12932 so embedders could opt back into csdb on aarch64, but Engine::check_compatible_with_native_host doesn't know about it. With it enabled on an aarch64 host, Module::new and loading a precompiled module both fail with don't know how to test for target-specific flag "use_csdb" at runtime, so the setting docs/security.md recommends can't be used for native code.

CSDB is encoded in the hint space and runs as a NOP on CPUs that don't implement it, so this adds it next to use_bti among the aarch64 flags that need no detection.

The new test in tests/all/module.rs runs only on aarch64. For both use_bti and use_csdb, it compiles a module with a call_indirect (a Spectre-guarded table access) and a br_table (a jump table), which are the two places use_csdb emits csdb. 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.0 before 51.0.0. The commit cherry-picks onto it without conflicts.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 21:45):

cfallin removed the review request for dicej from PR #15357.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 21:45):

cfallin requested cfallin for a review on PR #15357.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 21:48):

:thumbs_up: cfallin submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 21:49):

cfallin added PR #15357 Allow use_csdb when checking compatibility with the native host to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 22:13):

:check: cfallin merged PR #15357.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 22:13):

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