Kconfig 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. config SECURITY_APPARMOR
  3. bool "AppArmor support"
  4. depends on SECURITY && NET
  5. select AUDIT
  6. select SECURITY_PATH
  7. select SECURITYFS
  8. select SECURITY_NETWORK
  9. default n
  10. help
  11. This enables the AppArmor security module.
  12. Required userspace tools (if they are not included in your
  13. distribution) and further information may be found at
  14. http://apparmor.wiki.kernel.org
  15. If you are unsure how to answer this question, answer N.
  16. config SECURITY_APPARMOR_DEBUG
  17. bool "Build AppArmor with debug code"
  18. depends on SECURITY_APPARMOR
  19. default n
  20. help
  21. Build apparmor with debugging logic in apparmor. Not all
  22. debugging logic will necessarily be enabled. A submenu will
  23. provide fine grained control of the debug options that are
  24. available.
  25. config SECURITY_APPARMOR_DEBUG_ASSERTS
  26. bool "Build AppArmor with debugging asserts"
  27. depends on SECURITY_APPARMOR_DEBUG
  28. default y
  29. help
  30. Enable code assertions made with AA_BUG. These are primarily
  31. function entry preconditions but also exist at other key
  32. points. If the assert is triggered it will trigger a WARN
  33. message.
  34. config SECURITY_APPARMOR_DEBUG_MESSAGES
  35. bool "Debug messages enabled by default"
  36. depends on SECURITY_APPARMOR_DEBUG
  37. default n
  38. help
  39. Set the default value of the apparmor.debug kernel parameter.
  40. When enabled, various debug messages will be logged to
  41. the kernel message buffer.
  42. config SECURITY_APPARMOR_INTROSPECT_POLICY
  43. bool "Allow loaded policy to be introspected"
  44. depends on SECURITY_APPARMOR
  45. default y
  46. help
  47. This option selects whether introspection of loaded policy
  48. is available to userspace via the apparmor filesystem. This
  49. adds to kernel memory usage. It is required for introspection
  50. of loaded policy, and check point and restore support. It
  51. can be disabled for embedded systems where reducing memory and
  52. cpu is paramount.
  53. config SECURITY_APPARMOR_HASH
  54. bool "Enable introspection of sha256 hashes for loaded profiles"
  55. depends on SECURITY_APPARMOR_INTROSPECT_POLICY
  56. select CRYPTO_LIB_SHA256
  57. default y
  58. help
  59. This option selects whether introspection of loaded policy
  60. hashes is available to userspace via the apparmor
  61. filesystem. This option provides a light weight means of
  62. checking loaded policy. This option adds to policy load
  63. time and can be disabled for small embedded systems.
  64. config SECURITY_APPARMOR_HASH_DEFAULT
  65. bool "Enable policy hash introspection by default"
  66. depends on SECURITY_APPARMOR_HASH
  67. default y
  68. help
  69. This option selects whether sha256 hashing of loaded policy
  70. is enabled by default. The generation of sha256 hashes for
  71. loaded policy provide system administrators a quick way to
  72. verify that policy in the kernel matches what is expected,
  73. however it can slow down policy load on some devices. In
  74. these cases policy hashing can be disabled by default and
  75. enabled only if needed.
  76. config SECURITY_APPARMOR_EXPORT_BINARY
  77. bool "Allow exporting the raw binary policy"
  78. depends on SECURITY_APPARMOR_INTROSPECT_POLICY
  79. select ZSTD_COMPRESS
  80. select ZSTD_DECOMPRESS
  81. default y
  82. help
  83. This option allows reading back binary policy as it was loaded.
  84. It increases the amount of kernel memory needed by policy and
  85. also increases policy load time. This option is required for
  86. checkpoint and restore support, and debugging of loaded policy.
  87. config SECURITY_APPARMOR_PARANOID_LOAD
  88. bool "Perform full verification of loaded policy"
  89. depends on SECURITY_APPARMOR
  90. default y
  91. help
  92. This options allows controlling whether apparmor does a full
  93. verification of loaded policy. This should not be disabled
  94. except for embedded systems where the image is read only,
  95. includes policy, and has some form of integrity check.
  96. Disabling the check will speed up policy loads.
  97. config SECURITY_APPARMOR_KUNIT_TEST
  98. tristate "Build KUnit tests for policy_unpack.c" if !KUNIT_ALL_TESTS
  99. depends on KUNIT && SECURITY_APPARMOR
  100. default KUNIT_ALL_TESTS
  101. help
  102. This builds the AppArmor KUnit tests.
  103. KUnit tests run during boot and output the results to the debug log
  104. in TAP format (https://testanything.org/). Only useful for kernel devs
  105. running KUnit test harness and are not for inclusion into a
  106. production build.
  107. For more information on KUnit and unit tests in general please refer
  108. to the KUnit documentation in Documentation/dev-tools/kunit/.
  109. If unsure, say N.