Kconfig 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. config INTEGRITY
  4. bool "Integrity subsystem"
  5. depends on SECURITY
  6. default y
  7. help
  8. This option enables the integrity subsystem, which is comprised
  9. of a number of different components including the Integrity
  10. Measurement Architecture (IMA), Extended Verification Module
  11. (EVM), IMA-appraisal extension, digital signature verification
  12. extension and audit measurement log support.
  13. Each of these components can be enabled/disabled separately.
  14. Refer to the individual components for additional details.
  15. if INTEGRITY
  16. config INTEGRITY_SIGNATURE
  17. bool "Digital signature verification using multiple keyrings"
  18. default n
  19. select KEYS
  20. select SIGNATURE
  21. help
  22. This option enables digital signature verification support
  23. using multiple keyrings. It defines separate keyrings for each
  24. of the different use cases - evm, ima, and modules.
  25. Different keyrings improves search performance, but also allow
  26. to "lock" certain keyring to prevent adding new keys.
  27. This is useful for evm and module keyrings, when keys are
  28. usually only added from initramfs.
  29. config INTEGRITY_ASYMMETRIC_KEYS
  30. bool "Enable asymmetric keys support"
  31. depends on INTEGRITY_SIGNATURE
  32. default n
  33. select ASYMMETRIC_KEY_TYPE
  34. select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
  35. select CRYPTO_RSA
  36. select X509_CERTIFICATE_PARSER
  37. help
  38. This option enables digital signature verification using
  39. asymmetric keys.
  40. config INTEGRITY_TRUSTED_KEYRING
  41. bool "Require all keys on the integrity keyrings be signed"
  42. depends on SYSTEM_TRUSTED_KEYRING
  43. depends on INTEGRITY_ASYMMETRIC_KEYS
  44. default y
  45. help
  46. This option requires that all keys added to the .ima and
  47. .evm keyrings be signed by a key on the system trusted
  48. keyring.
  49. config INTEGRITY_PLATFORM_KEYRING
  50. bool "Provide keyring for platform/firmware trusted keys"
  51. depends on INTEGRITY_ASYMMETRIC_KEYS
  52. depends on SYSTEM_BLACKLIST_KEYRING
  53. help
  54. Provide a separate, distinct keyring for platform trusted keys, which
  55. the kernel automatically populates during initialization from values
  56. provided by the platform for verifying the kexec'ed kerned image
  57. and, possibly, the initramfs signature.
  58. config INTEGRITY_MACHINE_KEYRING
  59. bool "Provide a keyring to which Machine Owner Keys may be added"
  60. depends on SECONDARY_TRUSTED_KEYRING
  61. depends on INTEGRITY_ASYMMETRIC_KEYS
  62. depends on SYSTEM_BLACKLIST_KEYRING
  63. depends on LOAD_UEFI_KEYS
  64. depends on !IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY
  65. help
  66. If set, provide a keyring to which Machine Owner Keys (MOK) may
  67. be added. This keyring shall contain just MOK keys. Unlike keys
  68. in the platform keyring, keys contained in the .machine keyring will
  69. be trusted within the kernel.
  70. config LOAD_UEFI_KEYS
  71. depends on INTEGRITY_PLATFORM_KEYRING
  72. depends on EFI
  73. def_bool y
  74. config LOAD_IPL_KEYS
  75. depends on INTEGRITY_PLATFORM_KEYRING
  76. depends on S390
  77. def_bool y
  78. config LOAD_PPC_KEYS
  79. bool "Enable loading of platform and blacklisted keys for POWER"
  80. depends on INTEGRITY_PLATFORM_KEYRING
  81. depends on PPC_SECURE_BOOT
  82. default y
  83. help
  84. Enable loading of keys to the .platform keyring and blacklisted
  85. hashes to the .blacklist keyring for powerpc based platforms.
  86. config INTEGRITY_AUDIT
  87. bool "Enables integrity auditing support "
  88. depends on AUDIT
  89. default y
  90. help
  91. In addition to enabling integrity auditing support, this
  92. option adds a kernel parameter 'integrity_audit', which
  93. controls the level of integrity auditing messages.
  94. 0 - basic integrity auditing messages (default)
  95. 1 - additional integrity auditing messages
  96. Additional informational integrity auditing messages would
  97. be enabled by specifying 'integrity_audit=1' on the kernel
  98. command line.
  99. source "security/integrity/ima/Kconfig"
  100. source "security/integrity/evm/Kconfig"
  101. endif # if INTEGRITY