python-prctl icon indicating copy to clipboard operation
python-prctl copied to clipboard

test_speculation_ctrl will fail on some systems

Open catern opened this issue 5 years ago • 0 comments

test_speculation_ctrl calls prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_ENABLE), but when running on a kernel where someone has previously called prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_FORCE_DISABLE), this will always fail.

We ran into this in the Nix package, where we need to disable this test to build reliably: https://github.com/NixOS/nixpkgs/pull/106875

Maybe the test should call PR_GET_SPECULATION_CTRL first and check if it's PR_SPEC_FORCE_DISABLE, and skip the ENABLE if so?

catern avatar Dec 14 '20 05:12 catern