xref: /openbmc/linux/security/selinux/Kconfig (revision 1804569d)
1config SECURITY_SELINUX
2	bool "NSA SELinux Support"
3	depends on SECURITY_NETWORK && AUDIT && 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
11config SECURITY_SELINUX_BOOTPARAM
12	bool "NSA 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
23	  If you are unsure how to answer this question, answer N.
24
25config SECURITY_SELINUX_DISABLE
26	bool "NSA SELinux runtime disable"
27	depends on SECURITY_SELINUX
28	select SECURITY_WRITABLE_HOOKS
29	default n
30	help
31	  This option enables writing to a selinuxfs node 'disable', which
32	  allows SELinux to be disabled at runtime prior to the policy load.
33	  SELinux will then remain disabled until the next boot.
34	  This option is similar to the selinux=0 boot parameter, but is to
35	  support runtime disabling of SELinux, e.g. from /sbin/init, for
36	  portability across platforms where boot parameters are difficult
37	  to employ.
38
39	  NOTE: selecting this option will disable the '__ro_after_init'
40	  kernel hardening feature for security hooks.   Please consider
41	  using the selinux=0 boot parameter instead of enabling this
42	  option.
43
44	  If you are unsure how to answer this question, answer N.
45
46config SECURITY_SELINUX_DEVELOP
47	bool "NSA SELinux Development Support"
48	depends on SECURITY_SELINUX
49	default y
50	help
51	  This enables the development support option of NSA SELinux,
52	  which is useful for experimenting with SELinux and developing
53	  policies.  If unsure, say Y.  With this option enabled, the
54	  kernel will start in permissive mode (log everything, deny nothing)
55	  unless you specify enforcing=1 on the kernel command line.  You
56	  can interactively toggle the kernel between enforcing mode and
57	  permissive mode (if permitted by the policy) via /selinux/enforce.
58
59config SECURITY_SELINUX_AVC_STATS
60	bool "NSA SELinux AVC Statistics"
61	depends on SECURITY_SELINUX
62	default y
63	help
64	  This option collects access vector cache statistics to
65	  /selinux/avc/cache_stats, which may be monitored via
66	  tools such as avcstat.
67
68config SECURITY_SELINUX_CHECKREQPROT_VALUE
69	int "NSA SELinux checkreqprot default value"
70	depends on SECURITY_SELINUX
71	range 0 1
72	default 0
73	help
74	  This option sets the default value for the 'checkreqprot' flag
75	  that determines whether SELinux checks the protection requested
76	  by the application or the protection that will be applied by the
77	  kernel (including any implied execute for read-implies-exec) for
78	  mmap and mprotect calls.  If this option is set to 0 (zero),
79	  SELinux will default to checking the protection that will be applied
80	  by the kernel.  If this option is set to 1 (one), SELinux will
81	  default to checking the protection requested by the application.
82	  The checkreqprot flag may be changed from the default via the
83	  'checkreqprot=' boot parameter.  It may also be changed at runtime
84	  via /selinux/checkreqprot if authorized by policy.
85
86	  If you are unsure how to answer this question, answer 0.
87