Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpk: temporarily disable to avoid CI failures #7446

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

abrown
Copy link
Contributor

@abrown abrown commented Nov 1, 2023

GitHub CI runners are showing some strange behavior: on certain runners (unknown which ones), the CPUID bits claim that MPK is supported, but running any MPK code (e.g., RDPKRU) causes a SIGILL crash. This change disables MPK until #7445 is resolved.

GitHub CI runners are showing some strange behavior: on certain runners
(unknown which ones), the CPUID bits claim that MPK is supported, but
running any MPK code (e.g., `RDPKRU`) causes a `SIGILL` crash. This
change disables MPK until bytecodealliance#7445 is resolved.
@abrown abrown requested a review from a team as a code owner November 1, 2023 16:48
@abrown abrown requested review from pchickey and removed request for a team November 1, 2023 16:48
@abrown abrown enabled auto-merge November 1, 2023 16:55
abrown added a commit to abrown/wasmtime that referenced this pull request Nov 1, 2023
We discovered that certain CPUs claim that MPK is available but then
fail when running MPK instructions; MPK support was temporarily disabled
in bytecodealliance#7446; this change re-enables it.

Closes bytecodealliance#7445.
@abrown abrown added this pull request to the merge queue Nov 1, 2023
Merged via the queue into bytecodealliance:main with commit c741d24 Nov 1, 2023
18 checks passed
@abrown abrown deleted the pku-disable branch November 1, 2023 18:04
abrown added a commit to abrown/wasmtime that referenced this pull request Nov 9, 2023
In bytecodealliance#7446 I disabled MPK support temporarily due to failures in CI runs.
Looking into this further in bytecodealliance#7445, I discovered that it is due to how
`has_cpuid_bit_set` works on different x86 machines: Intel's `CPUID`
instruction reports support for MPK in a certain leaf bit, AMD does it
some other (unknown?) way. The CI problem boiled down to occasional runs
on AMD machines that would fail with `SIGILL` because the AMD machine
reported that it had MPK support when it really did not. This change
fixes the issue by first checking if the CPU vendor string is
`GenuineIntel` before inspecting the MPK `CPUID` leaf bit.

Closes bytecodealliance#7445.
github-merge-queue bot pushed a commit that referenced this pull request Nov 9, 2023
* mpk: reenable MPK support with vendor string check

In #7446 I disabled MPK support temporarily due to failures in CI runs.
Looking into this further in #7445, I discovered that it is due to how
`has_cpuid_bit_set` works on different x86 machines: Intel's `CPUID`
instruction reports support for MPK in a certain leaf bit, AMD does it
some other (unknown?) way. The CI problem boiled down to occasional runs
on AMD machines that would fail with `SIGILL` because the AMD machine
reported that it had MPK support when it really did not. This change
fixes the issue by first checking if the CPU vendor string is
`GenuineIntel` before inspecting the MPK `CPUID` leaf bit.

Closes #7445.

* review: use `u32::from_le_bytes` to self-document the string check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants