public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v3 00/10] LTP tests: load predefined policy, enhancements
@ 2025-01-14 11:29 Petr Vorel
  2025-01-14 11:29 ` [LTP] [PATCH v3 01/10] ima_violations.sh: Fix log detection Petr Vorel
                   ` (10 more replies)
  0 siblings, 11 replies; 26+ messages in thread
From: Petr Vorel @ 2025-01-14 11:29 UTC (permalink / raw)
  To: ltp; +Cc: linux-integrity

Changes v2->v3:
* Rewrite verifying logic if policy needs to be loaded and how it is
  loaded.
* Allow testing when policy is not reliable, but relax failures to TCONF.
* Add TCB policy example.
* Document LTP_IMA_LOAD_POLICY in doc/users/setup_tests.rst.
* Fix test policy installation (previously wrong Makefile).
* Removed some of the previous commits ("ima_kexec.sh: Relax result on
  unreadable policy to TCONF", "ima_violations.sh: Check for a required policy",
  "ima_setup: Print warning when policy not readable").
* More cleanup.

TODO: ima_measurements.sh and ima_violations.sh use detection for
ima_policy=tcb builtin policy. But if example policy is loaded there is
no longer tcb policy. Not sure how to fix it - some tooling might not
support reboot, thus I wanted to use ima_policy=tcb, which previously
worked.

Petr Vorel (10):
  ima_violations.sh: Fix log detection
  IMA: Add TCB policy as an example for ima_measurements.sh
  IMA: Move requirement check to ima_setup.sh
  IMA: Add example policy for ima_violations.sh
  IMA: Read required policy from file
  ima_violations.sh: Declare tcb builtin policy
  ima_setup.sh: Add digest index detection for ima-buf format
  ima_setup.sh: Allow to load predefined policy
  ima_measurements.sh: Check policy for test3
  tst_test.sh: IMA: Allow to disable LSM warnings and use it for IMA

 doc/users/setup_tests.rst                     |   3 +
 .../kernel/security/integrity/ima/README.md   |  12 ++
 .../security/integrity/ima/datafiles/Makefile |   4 +-
 .../ima/datafiles/ima_measurements/Makefile   |  11 ++
 .../ima/datafiles/ima_measurements/tcb.policy |  20 +++
 .../ima/datafiles/ima_violations/Makefile     |  11 ++
 .../ima_violations/violations.policy          |   2 +
 .../integrity/ima/tests/evm_overlay.sh        |   3 +-
 .../security/integrity/ima/tests/ima_kexec.sh |  20 +--
 .../security/integrity/ima/tests/ima_keys.sh  |  48 ++-----
 .../integrity/ima/tests/ima_measurements.sh   |  19 ++-
 .../integrity/ima/tests/ima_selinux.sh        |  23 ++-
 .../security/integrity/ima/tests/ima_setup.sh | 135 +++++++++++++++---
 .../integrity/ima/tests/ima_violations.sh     |  15 +-
 testcases/lib/tst_test.sh                     |   4 +-
 15 files changed, 235 insertions(+), 95 deletions(-)
 create mode 100644 testcases/kernel/security/integrity/ima/datafiles/ima_measurements/Makefile
 create mode 100644 testcases/kernel/security/integrity/ima/datafiles/ima_measurements/tcb.policy
 create mode 100644 testcases/kernel/security/integrity/ima/datafiles/ima_violations/Makefile
 create mode 100644 testcases/kernel/security/integrity/ima/datafiles/ima_violations/violations.policy

-- 
2.47.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2025-02-04 11:18 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-14 11:29 [LTP] [PATCH v3 00/10] LTP tests: load predefined policy, enhancements Petr Vorel
2025-01-14 11:29 ` [LTP] [PATCH v3 01/10] ima_violations.sh: Fix log detection Petr Vorel
2025-01-23 17:37   ` Mimi Zohar
2025-01-14 11:29 ` [LTP] [PATCH v3 02/10] IMA: Add TCB policy as an example for ima_measurements.sh Petr Vorel
2025-01-23 17:38   ` Mimi Zohar
2025-02-03 15:46     ` Mimi Zohar
2025-01-14 11:29 ` [LTP] [PATCH v3 03/10] IMA: Move requirement check to ima_setup.sh Petr Vorel
2025-01-23 17:38   ` Mimi Zohar
2025-01-14 11:29 ` [LTP] [PATCH v3 04/10] IMA: Add example policy for ima_violations.sh Petr Vorel
2025-02-03 15:51   ` Mimi Zohar
2025-01-14 11:29 ` [LTP] [PATCH v3 05/10] IMA: Read required policy from file Petr Vorel
2025-01-23 17:39   ` Mimi Zohar
2025-02-04 11:17     ` Petr Vorel
2025-01-14 11:29 ` [LTP] [PATCH v3 06/10] ima_violations.sh: Declare tcb builtin policy Petr Vorel
2025-01-23 17:45   ` Mimi Zohar
2025-01-14 11:29 ` [LTP] [PATCH v3 07/10] ima_setup.sh: Add digest index detection for ima-buf format Petr Vorel
2025-02-03 16:00   ` Mimi Zohar
2025-01-14 11:29 ` [LTP] [PATCH v3 08/10] ima_setup.sh: Allow to load predefined policy Petr Vorel
2025-02-03 16:31   ` Mimi Zohar
2025-01-14 11:29 ` [LTP] [PATCH v3 09/10] ima_measurements.sh: Check policy for test3 Petr Vorel
2025-01-23 17:39   ` Mimi Zohar
2025-01-14 11:29 ` [LTP] [PATCH v3 10/10] tst_test.sh: IMA: Allow to disable LSM warnings and use it for IMA Petr Vorel
2025-01-23 17:39   ` Mimi Zohar
2025-01-31  9:26   ` Cyril Hrubis
2025-01-31 12:09     ` Petr Vorel
2025-01-23 17:37 ` [LTP] [PATCH v3 00/10] LTP tests: load predefined policy, enhancements Mimi Zohar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox