Kconfig 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. config SECURITY_SELINUX
  3. bool "SELinux Support"
  4. depends on SECURITY_NETWORK && AUDIT && NET && INET
  5. select NETWORK_SECMARK
  6. default n
  7. help
  8. This selects Security-Enhanced Linux (SELinux).
  9. You will also need a policy configuration and a labeled filesystem.
  10. If you are unsure how to answer this question, answer N.
  11. config SECURITY_SELINUX_BOOTPARAM
  12. bool "SELinux boot parameter"
  13. depends on SECURITY_SELINUX
  14. default n
  15. help
  16. This option adds a kernel parameter 'selinux', which allows SELinux
  17. to be disabled at boot. If this option is selected, SELinux
  18. functionality can be disabled with selinux=0 on the kernel
  19. command line. The purpose of this option is to allow a single
  20. kernel image to be distributed with SELinux built in, but not
  21. necessarily enabled.
  22. If you are unsure how to answer this question, answer N.
  23. config SECURITY_SELINUX_DEVELOP
  24. bool "SELinux Development Support"
  25. depends on SECURITY_SELINUX
  26. default y
  27. help
  28. This enables the development support option of SELinux,
  29. which is useful for experimenting with SELinux and developing
  30. policies. If unsure, say Y. With this option enabled, the
  31. kernel will start in permissive mode (log everything, deny nothing)
  32. unless you specify enforcing=1 on the kernel command line. You
  33. can interactively toggle the kernel between enforcing mode and
  34. permissive mode (if permitted by the policy) via
  35. /sys/fs/selinux/enforce.
  36. config SECURITY_SELINUX_AVC_STATS
  37. bool "SELinux AVC Statistics"
  38. depends on SECURITY_SELINUX
  39. default y
  40. help
  41. This option collects access vector cache statistics to
  42. /sys/fs/selinux/avc/cache_stats, which may be monitored via
  43. tools such as avcstat.
  44. config SECURITY_SELINUX_SIDTAB_HASH_BITS
  45. int "SELinux sidtab hashtable size"
  46. depends on SECURITY_SELINUX
  47. range 8 13
  48. default 9
  49. help
  50. This option sets the number of buckets used in the sidtab hashtable
  51. to 2^SECURITY_SELINUX_SIDTAB_HASH_BITS buckets. The number of hash
  52. collisions may be viewed at /sys/fs/selinux/ss/sidtab_hash_stats. If
  53. chain lengths are high (e.g. > 20) then selecting a higher value here
  54. will ensure that lookups times are short and stable.
  55. config SECURITY_SELINUX_SID2STR_CACHE_SIZE
  56. int "SELinux SID to context string translation cache size"
  57. depends on SECURITY_SELINUX
  58. default 256
  59. help
  60. This option defines the size of the internal SID -> context string
  61. cache, which improves the performance of context to string
  62. conversion. Setting this option to 0 disables the cache completely.
  63. If unsure, keep the default value.
  64. config SECURITY_SELINUX_DEBUG
  65. bool "SELinux kernel debugging support"
  66. depends on SECURITY_SELINUX
  67. default n
  68. help
  69. This enables debugging code designed to help SELinux kernel
  70. developers, unless you know what this does in the kernel code you
  71. should leave this disabled.
  72. To fine control the messages to be printed enable
  73. CONFIG_DYNAMIC_DEBUG and see
  74. Documentation/admin-guide/dynamic-debug-howto.rst for additional
  75. information.
  76. Example usage:
  77. echo -n 'file "security/selinux/*" +p' > \
  78. /proc/dynamic_debug/control