Security flush selftests fail when page size == 4K
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 14
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Several of the selftests for the security flush mitigations fail when the page size is 4K:
test: uaccess_flush_test
tags: git_version:v6.0-rc1-434-g3dab0a9cd867
PASS (L1D misses with uaccess_flush=1: 193986539 > 190000000) [10/10 pass]
FAIL (L1D misses with uaccess_flush=0: 134015968 > 95000000) [10/10 failures]
failure: uaccess_flush_test
...
test: entry_flush_test
tags: git_version:v6.0-rc1-434-g3dab0a9cd867
PASS (L1D misses with entry_flush=1: 190602271 > 190000000) [10/10 pass]
FAIL (L1D misses with entry_flush=0: 122961742 > 95000000) [10/10 failures]
failure: entry_flush_test
...
test: rfi_flush_test
tags: git_version:v6.0-rc1-434-g3dab0a9cd867
PASS (L1D misses with rfi_flush=1: 195022410 > 190000000) [10/10 pass]
FAIL (L1D misses with rfi_flush=0: 128320653 > 95000000) [10/10 failures]
failure: rfi_flush_test
In all cases it's clear that the flushes are affecting the number of cache misses, so the mitigation is in effect. But the thresholds we have for determining pass/fail are not correct when the page size is 4K.
To fix it we probably just need to add some logic that tweaks the threshold when the page size is 4K.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the named uaccess_flush_test, entry_flush_test, and rfi_flush_test selftests and inspect how their cache-miss thresholds are selected. Adjust the 4K page-size threshold logic so the tests pass while still distinguishing enabled and disabled mitigations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems, security, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100