Documentation ¶
Overview ¶
Package mitigate provides libraries for the mitigate command. The mitigate command mitigates side channel attacks such as MDS. Mitigate shuts down CPUs via /sys/devices/system/cpu/cpu{N}/online.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUSet ¶
type CPUSet map[threadID]*ThreadGroup
CPUSet contains a map of all CPUs on the system, mapped by Physical ID and CoreIDs. threads with the same Core and Physical ID are Hyperthread pairs.
func NewCPUSetFromPossible ¶
NewCPUSetFromPossible makes a cpuSet data read from /sys/devices/system/cpu/possible. This is used in enable operations where the caller simply wants to enable all CPUS.
func (CPUSet) GetRemainingList ¶
GetRemainingList returns the list of threads that will remain active after mitigation.
func (CPUSet) GetShutdownList ¶
GetShutdownList returns the list of threads that will be shutdown on mitigation.
type Thread ¶
type Thread struct {
// contains filtered or unexported fields
}
Thread represents pertinent info about a single hyperthread in a pair.
func GetThreadsFromPossible ¶
GetThreadsFromPossible makes threads from data read from /sys/devices/system/cpu/possible.
func (Thread) IsVulnerable ¶
IsVulnerable checks if a CPU is vulnerable to mds.
type ThreadGroup ¶
type ThreadGroup struct {
// contains filtered or unexported fields
}
ThreadGroup represents Hyperthread pairs on the same physical/core ID.
func (ThreadGroup) String ¶
func (c ThreadGroup) String() string
String implements the String method for threadGroup.