Skip to content

Commit

Permalink
syntax fix
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Apr 24, 2024
1 parent 126a8ca commit dbab4df
Showing 1 changed file with 1 addition and 53 deletions.
54 changes: 1 addition & 53 deletions src/lib/bootloader/systemdboot_widgets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,59 +108,7 @@ def store

# Represents decision if smt is enabled
class CpuMitigationsWidget < CWM::ComboBox

def initialize
textdomain "bootloader"

super
end

def label
_("CPU Mitigations")
end

def items
::Bootloader::CpuMitigations::ALL.map do |m|
[m.value.to_s, m.to_human_string]
end
end

def help
_(
"<p><b>CPU Mitigations</b><br>\n" \
"The option selects which default settings should be used for CPU \n" \
"side channels mitigations. A highlevel description is on our Technical Information \n" \
"Document TID 7023836. Following options are available:<ul>\n" \
"<li><b>Auto</b>: This option enables all the mitigations needed for your CPU model. \n" \
"This setting can impact performance to some degree, depending on CPU model and \n" \
"workload. It provides all security mitigations, but it does not protect against \n" \
"cross-CPU thread attacks.</li>\n" \
"<li><b>Auto + No SMT</b>: This option enables all the above mitigations in \n" \
"\"Auto\", and also disables Simultaneous Multithreading to avoid \n" \
"side channel attacks across multiple CPU threads. This setting can \n" \
"further impact performance, depending on your \n" \
"workload. This setting provides the full set of available security mitigations.</li>\n" \
"<li><b>Off</b>: All CPU Mitigations are disabled. This setting has no performance \n" \
"impact, but side channel attacks against your CPU are possible, depending on CPU \n" \
"model.</li>\n" \
"<li><b>Manual</b>: This setting does not specify a mitigation level and leaves \n" \
"this to be the kernel default. The administrator can add other mitigations options \n" \
"in the <i>kernel command line</i> widget.\n" \
"All CPU mitigation specific options can be set manually.</li></ul></p>"
)
end

def init
self.value = systemdboot.cpu_mitigations.value.to_s
end

def store
systemdboot.cpu_mitigations = ::Bootloader::CpuMitigations.new(value.to_sym) if enabled?
end
end

# Represents decision if smt is enabled
class CpuMitigationsWidget < CWM::ComboBox
include SystemdBootHelper

def initialize
textdomain "bootloader"
Expand Down

0 comments on commit dbab4df

Please sign in to comment.