Thomas Gleixner | ec8f24b | 2019-05-19 13:07:45 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
John Johansen | 016d825 | 2010-07-30 13:46:33 +1000 | [diff] [blame] | 2 | config SECURITY_APPARMOR |
| 3 | bool "AppArmor support" |
Randy Dunlap | 06c22da | 2010-08-02 10:52:18 -0700 | [diff] [blame] | 4 | depends on SECURITY && NET |
John Johansen | 016d825 | 2010-07-30 13:46:33 +1000 | [diff] [blame] | 5 | select AUDIT |
| 6 | select SECURITY_PATH |
| 7 | select SECURITYFS |
| 8 | select SECURITY_NETWORK |
John Johansen | fe166a9 | 2019-02-11 21:56:46 -0800 | [diff] [blame] | 9 | select ZLIB_INFLATE |
| 10 | select ZLIB_DEFLATE |
John Johansen | 016d825 | 2010-07-30 13:46:33 +1000 | [diff] [blame] | 11 | default n |
| 12 | help |
| 13 | This enables the AppArmor security module. |
| 14 | Required userspace tools (if they are not included in your |
| 15 | distribution) and further information may be found at |
| 16 | http://apparmor.wiki.kernel.org |
| 17 | |
| 18 | If you are unsure how to answer this question, answer N. |
| 19 | |
John Johansen | f8eb8a1 | 2013-08-14 11:27:36 -0700 | [diff] [blame] | 20 | config SECURITY_APPARMOR_HASH |
John Johansen | 6059f71 | 2014-10-24 09:16:14 -0700 | [diff] [blame] | 21 | bool "Enable introspection of sha1 hashes for loaded profiles" |
John Johansen | f8eb8a1 | 2013-08-14 11:27:36 -0700 | [diff] [blame] | 22 | depends on SECURITY_APPARMOR |
Arnd Bergmann | 083c129 | 2015-10-21 21:16:29 +0200 | [diff] [blame] | 23 | select CRYPTO |
John Johansen | f8eb8a1 | 2013-08-14 11:27:36 -0700 | [diff] [blame] | 24 | select CRYPTO_SHA1 |
| 25 | default y |
John Johansen | f8eb8a1 | 2013-08-14 11:27:36 -0700 | [diff] [blame] | 26 | help |
John Johansen | 6059f71 | 2014-10-24 09:16:14 -0700 | [diff] [blame] | 27 | This option selects whether introspection of loaded policy |
| 28 | is available to userspace via the apparmor filesystem. |
| 29 | |
| 30 | config SECURITY_APPARMOR_HASH_DEFAULT |
| 31 | bool "Enable policy hash introspection by default" |
| 32 | depends on SECURITY_APPARMOR_HASH |
| 33 | default y |
John Johansen | 6059f71 | 2014-10-24 09:16:14 -0700 | [diff] [blame] | 34 | help |
| 35 | This option selects whether sha1 hashing of loaded policy |
| 36 | is enabled by default. The generation of sha1 hashes for |
| 37 | loaded policy provide system administrators a quick way |
| 38 | to verify that policy in the kernel matches what is expected, |
| 39 | however it can slow down policy load on some devices. In |
| 40 | these cases policy hashing can be disabled by default and |
| 41 | enabled only if needed. |
John Johansen | 680cd62 | 2017-01-16 00:42:27 -0800 | [diff] [blame] | 42 | |
| 43 | config SECURITY_APPARMOR_DEBUG |
| 44 | bool "Build AppArmor with debug code" |
| 45 | depends on SECURITY_APPARMOR |
| 46 | default n |
| 47 | help |
| 48 | Build apparmor with debugging logic in apparmor. Not all |
| 49 | debugging logic will necessarily be enabled. A submenu will |
| 50 | provide fine grained control of the debug options that are |
| 51 | available. |
| 52 | |
| 53 | config SECURITY_APPARMOR_DEBUG_ASSERTS |
| 54 | bool "Build AppArmor with debugging asserts" |
| 55 | depends on SECURITY_APPARMOR_DEBUG |
| 56 | default y |
| 57 | help |
| 58 | Enable code assertions made with AA_BUG. These are primarily |
| 59 | function entry preconditions but also exist at other key |
| 60 | points. If the assert is triggered it will trigger a WARN |
| 61 | message. |
| 62 | |
| 63 | config SECURITY_APPARMOR_DEBUG_MESSAGES |
| 64 | bool "Debug messages enabled by default" |
| 65 | depends on SECURITY_APPARMOR_DEBUG |
| 66 | default n |
| 67 | help |
| 68 | Set the default value of the apparmor.debug kernel parameter. |
| 69 | When enabled, various debug messages will be logged to |
| 70 | the kernel message buffer. |
Mike Salvatore | 4d944bc | 2019-11-05 16:43:29 -0800 | [diff] [blame] | 71 | |
| 72 | config SECURITY_APPARMOR_KUNIT_TEST |
Anders Roxell | 6d6861d | 2020-05-11 15:14:42 +0200 | [diff] [blame] | 73 | bool "Build KUnit tests for policy_unpack.c" if !KUNIT_ALL_TESTS |
Alan Maguire | 35c57fc | 2020-01-10 11:49:25 +0000 | [diff] [blame] | 74 | depends on KUNIT=y && SECURITY_APPARMOR |
Anders Roxell | 6d6861d | 2020-05-11 15:14:42 +0200 | [diff] [blame] | 75 | default KUNIT_ALL_TESTS |
Mike Salvatore | 4d944bc | 2019-11-05 16:43:29 -0800 | [diff] [blame] | 76 | help |
| 77 | This builds the AppArmor KUnit tests. |
| 78 | |
| 79 | KUnit tests run during boot and output the results to the debug log |
Alexander A. Klimov | c9fecf5 | 2020-07-05 23:45:12 +0200 | [diff] [blame] | 80 | in TAP format (https://testanything.org/). Only useful for kernel devs |
Mike Salvatore | 4d944bc | 2019-11-05 16:43:29 -0800 | [diff] [blame] | 81 | running KUnit test harness and are not for inclusion into a |
| 82 | production build. |
| 83 | |
| 84 | For more information on KUnit and unit tests in general please refer |
| 85 | to the KUnit documentation in Documentation/dev-tools/kunit/. |
| 86 | |
| 87 | If unsure, say N. |