Kconfig 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # Integrity Policy Enforcement (IPE) configuration
  4. #
  5. menuconfig SECURITY_IPE
  6. bool "Integrity Policy Enforcement (IPE)"
  7. depends on SECURITY && SECURITYFS && AUDIT && AUDITSYSCALL
  8. select PKCS7_MESSAGE_PARSER
  9. select SYSTEM_DATA_VERIFICATION
  10. select IPE_PROP_DM_VERITY if DM_VERITY
  11. select IPE_PROP_DM_VERITY_SIGNATURE if DM_VERITY && DM_VERITY_VERIFY_ROOTHASH_SIG
  12. select IPE_PROP_FS_VERITY if FS_VERITY
  13. select IPE_PROP_FS_VERITY_BUILTIN_SIG if FS_VERITY && FS_VERITY_BUILTIN_SIGNATURES
  14. help
  15. This option enables the Integrity Policy Enforcement LSM
  16. allowing users to define a policy to enforce a trust-based access
  17. control. A key feature of IPE is a customizable policy to allow
  18. admins to reconfigure trust requirements on the fly.
  19. If unsure, answer N.
  20. if SECURITY_IPE
  21. config IPE_BOOT_POLICY
  22. string "Integrity policy to apply on system startup"
  23. help
  24. This option specifies a filepath to an IPE policy that is compiled
  25. into the kernel. This policy will be enforced until a policy update
  26. is deployed via the $securityfs/ipe/policies/$policy_name/active
  27. interface.
  28. If unsure, leave blank.
  29. config IPE_POLICY_SIG_SECONDARY_KEYRING
  30. bool "IPE policy update verification with secondary keyring"
  31. default y
  32. depends on SECONDARY_TRUSTED_KEYRING
  33. help
  34. Also allow the secondary trusted keyring to verify IPE policy
  35. updates.
  36. If unsure, answer Y.
  37. config IPE_POLICY_SIG_PLATFORM_KEYRING
  38. bool "IPE policy update verification with platform keyring"
  39. default y
  40. depends on INTEGRITY_PLATFORM_KEYRING
  41. help
  42. Also allow the platform keyring to verify IPE policy updates.
  43. If unsure, answer Y.
  44. menu "IPE Trust Providers"
  45. config IPE_PROP_DM_VERITY
  46. bool "Enable support for dm-verity based on root hash"
  47. depends on DM_VERITY
  48. help
  49. This option enables the 'dmverity_roothash' property within IPE
  50. policies. The property evaluates to TRUE when a file from a dm-verity
  51. volume is evaluated, and the volume's root hash matches the value
  52. supplied in the policy.
  53. config IPE_PROP_DM_VERITY_SIGNATURE
  54. bool "Enable support for dm-verity based on root hash signature"
  55. depends on DM_VERITY && DM_VERITY_VERIFY_ROOTHASH_SIG
  56. help
  57. This option enables the 'dmverity_signature' property within IPE
  58. policies. The property evaluates to TRUE when a file from a dm-verity
  59. volume, which has been mounted with a valid signed root hash,
  60. is evaluated.
  61. If unsure, answer Y.
  62. config IPE_PROP_FS_VERITY
  63. bool "Enable support for fs-verity based on file digest"
  64. depends on FS_VERITY
  65. help
  66. This option enables the 'fsverity_digest' property within IPE
  67. policies. The property evaluates to TRUE when a file is fsverity
  68. enabled and its digest matches the supplied digest value in the
  69. policy.
  70. if unsure, answer Y.
  71. config IPE_PROP_FS_VERITY_BUILTIN_SIG
  72. bool "Enable support for fs-verity based on builtin signature"
  73. depends on FS_VERITY && FS_VERITY_BUILTIN_SIGNATURES
  74. help
  75. This option enables the 'fsverity_signature' property within IPE
  76. policies. The property evaluates to TRUE when a file is fsverity
  77. enabled and it has a valid builtin signature whose signing cert
  78. is in the .fs-verity keyring.
  79. if unsure, answer Y.
  80. endmenu
  81. config SECURITY_IPE_KUNIT_TEST
  82. bool "Build KUnit tests for IPE" if !KUNIT_ALL_TESTS
  83. depends on KUNIT=y
  84. default KUNIT_ALL_TESTS
  85. help
  86. This builds the IPE KUnit tests.
  87. KUnit tests run during boot and output the results to the debug log
  88. in TAP format (https://testanything.org/). Only useful for kernel devs
  89. running KUnit test harness and are not for inclusion into a
  90. production build.
  91. For more information on KUnit and unit tests in general please refer
  92. to the KUnit documentation in Documentation/dev-tools/kunit/.
  93. If unsure, say N.
  94. endif