Skip to content

Commit

Permalink
ima_{kexec,keys,selinux}: Set minimal kernel version
Browse files Browse the repository at this point in the history
The functionality IMHO was not backported to the enterprise kernels.

This helps to avoid false positive in ima_kexec.sh:
ima_kexec 1 TWARN: policy not readable, it might not contain required
policy '^measure.*func=KEXEC_CMDLINE'
ima_kexec 1 TBROK: unable to find a correct measurement

Link: https://lore.kernel.org/ltp/[email protected]/
Reviewed-by: Mimi Zohar <[email protected]>
Signed-off-by: Petr Vorel <[email protected]>
  • Loading branch information
pevik committed Dec 12, 2024
1 parent 07e8d5f commit d1e29ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions testcases/kernel/security/integrity/ima/tests/ima_kexec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
TST_NEEDS_CMDS="grep kexec sed"
TST_CNT=3
TST_SETUP="setup"
TST_MIN_KVER="5.3"

IMA_KEXEC_IMAGE="${IMA_KEXEC_IMAGE:-/boot/vmlinuz-$(uname -r)}"
REQUIRED_POLICY='^measure.*func=KEXEC_CMDLINE'
Expand Down
1 change: 1 addition & 0 deletions testcases/kernel/security/integrity/ima/tests/ima_keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ TST_NEEDS_CMDS="cmp cut grep sed"
TST_CNT=2
TST_SETUP=setup
TST_CLEANUP=cleanup
TST_MIN_KVER="5.6"

FUNC_KEYCHECK='func=KEY_CHECK'
REQUIRED_POLICY="^measure.*$FUNC_KEYCHECK"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
TST_NEEDS_CMDS="awk cut grep tail"
TST_CNT=2
TST_SETUP="setup"
TST_MIN_KVER="5.12"

FUNC_CRITICAL_DATA='func=CRITICAL_DATA'
REQUIRED_POLICY="^measure.*$FUNC_CRITICAL_DATA"
Expand Down

0 comments on commit d1e29ad

Please sign in to comment.