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
d341eb82
Commit
d341eb82
authored
2 years ago
by
Alexander Popov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the mds check
parent
3f57717b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
__init__.py
kconfig_hardened_check/__init__.py
+5
-1
No files found.
kconfig_hardened_check/__init__.py
View file @
d341eb82
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
# Аrch-independent:
# Аrch-independent:
# X86:
# X86:
# l1d_flush=on (a part of the l1tf option)
# l1d_flush=on (a part of the l1tf option)
# mds=full,nosmt
# tsx=off
# tsx=off
# ARM64:
# ARM64:
# kpti=on
# kpti=on
...
@@ -741,6 +740,8 @@ def add_cmdline_checks(l, arch):
...
@@ -741,6 +740,8 @@ def add_cmdline_checks(l, arch):
CmdlineCheck
(
'self_protection'
,
'defconfig'
,
'spec_store_bypass_disable'
,
'is not set'
))]
CmdlineCheck
(
'self_protection'
,
'defconfig'
,
'spec_store_bypass_disable'
,
'is not set'
))]
l
+=
[
OR
(
CmdlineCheck
(
'self_protection'
,
'defconfig'
,
'l1tf'
,
'is not off'
),
l
+=
[
OR
(
CmdlineCheck
(
'self_protection'
,
'defconfig'
,
'l1tf'
,
'is not off'
),
CmdlineCheck
(
'self_protection'
,
'defconfig'
,
'l1tf'
,
'is not set'
))]
CmdlineCheck
(
'self_protection'
,
'defconfig'
,
'l1tf'
,
'is not set'
))]
l
+=
[
OR
(
CmdlineCheck
(
'self_protection'
,
'defconfig'
,
'mds'
,
'is not off'
),
CmdlineCheck
(
'self_protection'
,
'defconfig'
,
'mds'
,
'is not set'
))]
if
arch
==
'ARM64'
:
if
arch
==
'ARM64'
:
l
+=
[
OR
(
CmdlineCheck
(
'self_protection'
,
'defconfig'
,
'rodata'
,
'full'
),
l
+=
[
OR
(
CmdlineCheck
(
'self_protection'
,
'defconfig'
,
'rodata'
,
'full'
),
AND
(
KconfigCheck
(
'self_protection'
,
'defconfig'
,
'RODATA_FULL_DEFAULT_ENABLED'
,
'y'
),
AND
(
KconfigCheck
(
'self_protection'
,
'defconfig'
,
'RODATA_FULL_DEFAULT_ENABLED'
,
'y'
),
...
@@ -964,6 +965,9 @@ def normalize_cmdline_options(option, value):
...
@@ -964,6 +965,9 @@ def normalize_cmdline_options(option, value):
if
option
==
'l1tf'
:
if
option
==
'l1tf'
:
# See l1tf_cmdline() in arch/x86/kernel/cpu/bugs.c
# See l1tf_cmdline() in arch/x86/kernel/cpu/bugs.c
return
value
return
value
if
option
==
'mds'
:
# See mds_cmdline() in arch/x86/kernel/cpu/bugs.c
return
value
# Implement a limited part of the kstrtobool() logic
# Implement a limited part of the kstrtobool() logic
if
value
in
(
'1'
,
'on'
,
'On'
,
'ON'
,
'y'
,
'Y'
,
'yes'
,
'Yes'
,
'YES'
):
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