Kconfig 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. config SECURITY_SELINUX
  2. bool "NSA SELinux Support"
  3. depends on SECURITY_NETWORK && NET && INET
  4. select NETWORK_SECMARK
  5. default n
  6. help
  7. This selects NSA Security-Enhanced Linux (SELinux).
  8. You will also need a policy configuration and a labeled filesystem.
  9. If you are unsure how to answer this question, answer N.
  10. config SECURITY_SELINUX_BOOTPARAM
  11. bool "NSA SELinux boot parameter"
  12. depends on SECURITY_SELINUX
  13. default n
  14. help
  15. This option adds a kernel parameter 'selinux', which allows SELinux
  16. to be disabled at boot. If this option is selected, SELinux
  17. functionality can be disabled with selinux=0 on the kernel
  18. command line. The purpose of this option is to allow a single
  19. kernel image to be distributed with SELinux built in, but not
  20. necessarily enabled.
  21. If you are unsure how to answer this question, answer N.
  22. config SECURITY_SELINUX_BOOTPARAM_VALUE
  23. int "NSA SELinux boot parameter default value"
  24. depends on SECURITY_SELINUX_BOOTPARAM
  25. range 0 1
  26. default 1
  27. help
  28. This option sets the default value for the kernel parameter
  29. 'selinux', which allows SELinux to be disabled at boot. If this
  30. option is set to 0 (zero), the SELinux kernel parameter will
  31. default to 0, disabling SELinux at bootup. If this option is
  32. set to 1 (one), the SELinux kernel parameter will default to 1,
  33. enabling SELinux at bootup.
  34. If you are unsure how to answer this question, answer 1.
  35. config SECURITY_SELINUX_DISABLE
  36. bool "NSA SELinux runtime disable"
  37. depends on SECURITY_SELINUX
  38. select SECURITY_WRITABLE_HOOKS
  39. default n
  40. help
  41. This option enables writing to a selinuxfs node 'disable', which
  42. allows SELinux to be disabled at runtime prior to the policy load.
  43. SELinux will then remain disabled until the next boot.
  44. This option is similar to the selinux=0 boot parameter, but is to
  45. support runtime disabling of SELinux, e.g. from /sbin/init, for
  46. portability across platforms where boot parameters are difficult
  47. to employ.
  48. NOTE: selecting this option will disable the '__ro_after_init'
  49. kernel hardening feature for security hooks. Please consider
  50. using the selinux=0 boot parameter instead of enabling this
  51. option.
  52. If you are unsure how to answer this question, answer N.
  53. config SECURITY_SELINUX_DEVELOP
  54. bool "NSA SELinux Development Support"
  55. depends on SECURITY_SELINUX
  56. default y
  57. help
  58. This enables the development support option of NSA SELinux,
  59. which is useful for experimenting with SELinux and developing
  60. policies. If unsure, say Y. With this option enabled, the
  61. kernel will start in permissive mode (log everything, deny nothing)
  62. unless you specify enforcing=1 on the kernel command line. You
  63. can interactively toggle the kernel between enforcing mode and
  64. permissive mode (if permitted by the policy) via /selinux/enforce.
  65. config SECURITY_SELINUX_AVC_STATS
  66. bool "NSA SELinux AVC Statistics"
  67. depends on SECURITY_SELINUX
  68. default y
  69. help
  70. This option collects access vector cache statistics to
  71. /selinux/avc/cache_stats, which may be monitored via
  72. tools such as avcstat.
  73. config SECURITY_SELINUX_CHECKREQPROT_VALUE
  74. int "NSA SELinux checkreqprot default value"
  75. depends on SECURITY_SELINUX
  76. range 0 1
  77. default 0
  78. help
  79. This option sets the default value for the 'checkreqprot' flag
  80. that determines whether SELinux checks the protection requested
  81. by the application or the protection that will be applied by the
  82. kernel (including any implied execute for read-implies-exec) for
  83. mmap and mprotect calls. If this option is set to 0 (zero),
  84. SELinux will default to checking the protection that will be applied
  85. by the kernel. If this option is set to 1 (one), SELinux will
  86. default to checking the protection requested by the application.
  87. The checkreqprot flag may be changed from the default via the
  88. 'checkreqprot=' boot parameter. It may also be changed at runtime
  89. via /selinux/checkreqprot if authorized by policy.
  90. If you are unsure how to answer this question, answer 0.
  91. config SECURITY_SELINUX_SIDTAB_HASH_BITS
  92. int "NSA SELinux sidtab hashtable size"
  93. depends on SECURITY_SELINUX
  94. range 8 13
  95. default 9
  96. help
  97. This option sets the number of buckets used in the sidtab hashtable
  98. to 2^SECURITY_SELINUX_SIDTAB_HASH_BITS buckets. The number of hash
  99. collisions may be viewed at /sys/fs/selinux/ss/sidtab_hash_stats. If
  100. chain lengths are high (e.g. > 20) then selecting a higher value here
  101. will ensure that lookups times are short and stable.