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

Read CPU flags related to Spectre and Meltdown Vulnerabilities #92

Open
ale5000-git opened this issue Feb 8, 2018 · 1 comment
Open

Comments

@ale5000-git
Copy link

ale5000-git commented Feb 8, 2018

Hi,
is it possible to read CPU flags related to Spectre and Meltdown vulnerabilities?

These ones:

spec_ctrl
spec_ctrl_ibrs
pti
kaiser
pcid
invpcid
@workhorsy
Copy link
Owner

Maybe. It may just happen to work with the current way it reads flags:

On Linux, it is doing:

cat /proc/cpuinfo | grep flags

On OSX it is using sysctl and reading machdep.cpu.features, machdep.cpu.leaf7_features, and machdep.cpu.extfeatures fields:

sysctl machdep.cpu hw.cpufrequency

I don't think it will work on Windows, as I don't have an affected Windows machine to test it on. And I'm not sure how to read the new cpu flags. Anybody want to help with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants