Kconfig 3.7 KB

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