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

Add CPU Vulnerability flags #61

Open
ric96 opened this issue Nov 27, 2022 · 0 comments
Open

Add CPU Vulnerability flags #61

ric96 opened this issue Nov 27, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ric96
Copy link

ric96 commented Nov 27, 2022

Aarch64 SoCs may have very different list of vulnerabilities and their mitigation depending upon which revision of the Cortex IP is being implemented. Although this may depend on the specifics of kernel and userspace being used but its still useful to track.

From sysfs, this info is available under /sys/devices/system/cpu/vulnerabilities/.

Each known vulnerability is in its own file, and all of them can be read from a single string like so:
(*the example is from amd64 machine but works fine on arm64)

# for file in /sys/devices/system/cpu/vulnerabilities/*; do echo "$file"; cat "$file"; done
/sys/devices/system/cpu/vulnerabilities/itlb_multihit
Not affected
/sys/devices/system/cpu/vulnerabilities/l1tf
Not affected
/sys/devices/system/cpu/vulnerabilities/mds
Not affected
/sys/devices/system/cpu/vulnerabilities/meltdown
Not affected
/sys/devices/system/cpu/vulnerabilities/mmio_stale_data
Not affected
/sys/devices/system/cpu/vulnerabilities/retbleed
Mitigation: untrained return thunk; SMT enabled with STIBP protection
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass
Mitigation: Speculative Store Bypass disabled via prctl
/sys/devices/system/cpu/vulnerabilities/spectre_v1
Mitigation: usercopy/swapgs barriers and __user pointer sanitization
/sys/devices/system/cpu/vulnerabilities/spectre_v2
Mitigation: Retpolines, IBPB: conditional, STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected
/sys/devices/system/cpu/vulnerabilities/srbds
Not affected
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
Not affected
@hrw hrw added enhancement New feature or request help wanted Extra attention is needed labels Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants