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
5fbc06fa
Commit
5fbc06fa
authored
Mar 27, 2022
by
Alexander Popov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add cmdline checks to '--print'
parent
b9e670c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
__init__.py
kconfig_hardened_check/__init__.py
+9
-0
No files found.
kconfig_hardened_check/__init__.py
View file @
5fbc06fa
...
...
@@ -656,6 +656,14 @@ def add_kconfig_checks(l, arch):
# l += [KconfigCheck('feature_test', 'my', 'LKDTM', 'm')] # only for debugging!
def
add_cmdline_checks
(
l
,
arch
):
# Calling the CmdlineCheck class constructor:
# CmdlineCheck(reason, decision, name, expected)
l
+=
[
CmdlineCheck
(
'self_protection'
,
'kspp'
,
'randomize_kstack_offset'
,
'on'
)]
# TODO: add other
def
print_unknown_options
(
checklist
,
parsed_options
):
known_options
=
[]
...
...
@@ -861,6 +869,7 @@ def main():
sys
.
exit
(
'[!] ERROR: wrong mode "{}" for --print'
.
format
(
mode
))
arch
=
args
.
print
add_kconfig_checks
(
config_checklist
,
arch
)
add_cmdline_checks
(
config_checklist
,
arch
)
if
mode
!=
'json'
:
print
(
'[+] Printing kernel security hardening preferences for {}...'
.
format
(
arch
))
print_checklist
(
mode
,
config_checklist
,
False
)
...
...
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