Kconfig

If SECURITY_APPARMOR

CONFIG_SECURITY_APPARMOR_DEBUG Build AppArmor with debug code

On

Build apparmor with debugging logic in apparmor. Not all debugging logic will necessarily be enabled. A submenu will provide fine grained control of the debug options that are available.

If SECURITY_APPARMOR_DEBUG

CONFIG_SECURITY_APPARMOR_DEBUG_ASSERTS Build AppArmor with debugging asserts

On

Enable code assertions made with AA_BUG. These are primarily function entry preconditions but also exist at other key points. If the assert is triggered it will trigger a WARN message.

CONFIG_SECURITY_APPARMOR_DEBUG_MESSAGES Debug messages enabled by default

On

Set the default value of the apparmor.debug kernel parameter. When enabled, various debug messages will be logged to the kernel message buffer.

CONFIG_SECURITY_APPARMOR_INTROSPECT_POLICY Allow loaded policy to be introspected

On

This option selects whether introspection of loaded policy is available to userspace via the apparmor filesystem. This adds to kernel memory usage. It is required for introspection of loaded policy, and check point and restore support. It can be disabled for embedded systems where reducing memory and cpu is paramount.

If SECURITY_APPARMOR_INTROSPECT_POLICY

CONFIG_SECURITY_APPARMOR_HASH Enable introspection of sha256 hashes for loaded profiles

On

This option selects whether introspection of loaded policy hashes is available to userspace via the apparmor filesystem. This option provides a light weight means of checking loaded policy. This option adds to policy load time and can be disabled for small embedded systems.

If SECURITY_APPARMOR_HASH

CONFIG_SECURITY_APPARMOR_HASH_DEFAULT Enable policy hash introspection by default

On

This option selects whether sha256 hashing of loaded policy is enabled by default. The generation of sha256 hashes for loaded policy provide system administrators a quick way to verify that policy in the kernel matches what is expected, however it can slow down policy load on some devices. In these cases policy hashing can be disabled by default and enabled only if needed.

CONFIG_SECURITY_APPARMOR_COMPRESSED_POLICY Allow loading policy in a compressed format

On

This option allows loading policy from userspace in a compressed format. This allows for userspace to not have to decrompress caches before loading policy, and also allows for less kernel memory to be used when "exporting the raw binary policy" is enabled.

CONFIG_SECURITY_APPARMOR_PARANOID_LOAD Perform full verification of loaded policy

On

This options allows controlling whether apparmor does a full verification of loaded policy. This should not be disabled except for embedded systems where the image is read only, includes policy, and has some form of integrity check. Disabling the check will speed up policy loads.

CONFIG_SECURITY_APPARMOR_KUNIT_TEST Build KUnit tests for policy_unpack.c

  • Off
  • Module
  • Built in

This builds the AppArmor KUnit tests.

KUnit tests run during boot and output the results to the debug log in TAP format (https://testanything.org/). Only useful for kernel devs running KUnit test harness and are not for inclusion into a production build.

For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.

If unsure, say N.