Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kernel-hardening-checker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
kernel-hardening-checker
Commits
a9ccd7ae
Commit
a9ccd7ae
authored
2 years ago
by
Alexander Popov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the tsx check
parent
15c16ac1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
__init__.py
kconfig_hardened_check/__init__.py
+9
-1
No files found.
kconfig_hardened_check/__init__.py
View file @
a9ccd7ae
...
...
@@ -17,7 +17,6 @@
# Аrch-independent:
# X86:
# l1d_flush=on (a part of the l1tf option)
# tsx=off
# ARM64:
# kpti=on
#
...
...
@@ -796,6 +795,12 @@ def add_cmdline_checks(l, arch):
# 'self_protection', 'clipos'
l
+=
[
CmdlineCheck
(
'self_protection'
,
'clipos'
,
'page_alloc.shuffle'
,
'1'
)]
# 'cut_attack_surface', 'defconfig'
if
arch
in
(
'X86_64'
,
'X86_32'
):
l
+=
[
OR
(
CmdlineCheck
(
'cut_attack_surface'
,
'defconfig'
,
'tsx'
,
'off'
),
AND
(
KconfigCheck
(
'cut_attack_surface'
,
'defconfig'
,
'X86_INTEL_TSX_MODE_OFF'
,
'y'
),
CmdlineCheck
(
'cut_attack_surface'
,
'defconfig'
,
'tsx'
,
'is not set'
)))]
# 'cut_attack_surface', 'kspp'
if
arch
==
'X86_64'
:
l
+=
[
OR
(
CmdlineCheck
(
'cut_attack_surface'
,
'kspp'
,
'vsyscall'
,
'none'
),
...
...
@@ -989,6 +994,9 @@ def normalize_cmdline_options(option, value):
if
option
==
'retbleed'
:
# See retbleed_parse_cmdline() in arch/x86/kernel/cpu/bugs.c
return
value
if
option
==
'tsx'
:
# See tsx_init() in arch/x86/kernel/cpu/tsx.c
return
value
# Implement a limited part of the kstrtobool() logic
if
value
in
(
'1'
,
'on'
,
'On'
,
'ON'
,
'y'
,
'Y'
,
'yes'
,
'Yes'
,
'YES'
):
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment