CpuVulns - files /sys/devices/system/cpu/vulnerabilities/*

Parser to parse the output of files /sys/devices/system/cpu/vulnerabilities/*

class insights.parsers.cpu_vulns.CpuVulns(context)[source]

Bases: Parser

Base class to parse /sys/devices/system/cpu/vulnerabilities/* files, the file content will be stored in a string.

Sample output for files:
/sys/devices/system/cpu/vulnerabilities/spectre_v1::

Mitigation: Load fences

/sys/devices/system/cpu/vulnerabilities/spectre_v2::

Vulnerable: Retpoline without IBPB

/sys/devices/system/cpu/vulnerabilities/meltdown::

Mitigation: PTI

/sys/devices/system/cpu/vulnerabilities/spec_store_bypass::

Mitigation: Speculative Store Bypass disabled

Examples

>>> type(sp_v1)
<class 'insights.parsers.cpu_vulns.CpuVulns'>
>>> type(sp_v1) == type(sp_v2) == type(md) == type(ssb)
True
>>> sp_v1.value
'Mitigation: Load fences'
>>> sp_v2.value
'Vulnerable: Retpoline without IBPB'
>>> md.value
'Mitigation: PTI'
>>> ssb.value
'Mitigation: Speculative Store Bypass disabled'
value

The result parsed

Type:

str

Raises:

SkipComponent -- When file content is empty

parse_content(content)[source]

This method must be implemented by classes based on this class.