xref: /OK3568_Linux_fs/kernel/security/tomoyo/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0-only
2*4882a593Smuzhiyunconfig SECURITY_TOMOYO
3*4882a593Smuzhiyun	bool "TOMOYO Linux Support"
4*4882a593Smuzhiyun	depends on SECURITY
5*4882a593Smuzhiyun	depends on NET
6*4882a593Smuzhiyun	select SECURITYFS
7*4882a593Smuzhiyun	select SECURITY_PATH
8*4882a593Smuzhiyun	select SECURITY_NETWORK
9*4882a593Smuzhiyun	select SRCU
10*4882a593Smuzhiyun	select BUILD_BIN2C
11*4882a593Smuzhiyun	default n
12*4882a593Smuzhiyun	help
13*4882a593Smuzhiyun	  This selects TOMOYO Linux, pathname-based access control.
14*4882a593Smuzhiyun	  Required userspace tools and further information may be
15*4882a593Smuzhiyun	  found at <http://tomoyo.sourceforge.jp/>.
16*4882a593Smuzhiyun	  If you are unsure how to answer this question, answer N.
17*4882a593Smuzhiyun
18*4882a593Smuzhiyunconfig SECURITY_TOMOYO_MAX_ACCEPT_ENTRY
19*4882a593Smuzhiyun	int "Default maximal count for learning mode"
20*4882a593Smuzhiyun	default 2048
21*4882a593Smuzhiyun	range 0 2147483647
22*4882a593Smuzhiyun	depends on SECURITY_TOMOYO
23*4882a593Smuzhiyun	help
24*4882a593Smuzhiyun	  This is the default value for maximal ACL entries
25*4882a593Smuzhiyun	  that are automatically appended into policy at "learning mode".
26*4882a593Smuzhiyun	  Some programs access thousands of objects, so running
27*4882a593Smuzhiyun	  such programs in "learning mode" dulls the system response
28*4882a593Smuzhiyun	  and consumes much memory.
29*4882a593Smuzhiyun	  This is the safeguard for such programs.
30*4882a593Smuzhiyun
31*4882a593Smuzhiyunconfig SECURITY_TOMOYO_MAX_AUDIT_LOG
32*4882a593Smuzhiyun	int "Default maximal count for audit log"
33*4882a593Smuzhiyun	default 1024
34*4882a593Smuzhiyun	range 0 2147483647
35*4882a593Smuzhiyun	depends on SECURITY_TOMOYO
36*4882a593Smuzhiyun	help
37*4882a593Smuzhiyun	  This is the default value for maximal entries for
38*4882a593Smuzhiyun	  audit logs that the kernel can hold on memory.
39*4882a593Smuzhiyun	  You can read the log via /sys/kernel/security/tomoyo/audit.
40*4882a593Smuzhiyun	  If you don't need audit logs, you may set this value to 0.
41*4882a593Smuzhiyun
42*4882a593Smuzhiyunconfig SECURITY_TOMOYO_OMIT_USERSPACE_LOADER
43*4882a593Smuzhiyun	bool "Activate without calling userspace policy loader."
44*4882a593Smuzhiyun	default n
45*4882a593Smuzhiyun	depends on SECURITY_TOMOYO
46*4882a593Smuzhiyun	help
47*4882a593Smuzhiyun	  Say Y here if you want to activate access control as soon as built-in
48*4882a593Smuzhiyun	  policy was loaded. This option will be useful for systems where
49*4882a593Smuzhiyun	  operations which can lead to the hijacking of the boot sequence are
50*4882a593Smuzhiyun	  needed before loading the policy. For example, you can activate
51*4882a593Smuzhiyun	  immediately after loading the fixed part of policy which will allow
52*4882a593Smuzhiyun	  only operations needed for mounting a partition which contains the
53*4882a593Smuzhiyun	  variant part of policy and verifying (e.g. running GPG check) and
54*4882a593Smuzhiyun	  loading the variant part of policy. Since you can start using
55*4882a593Smuzhiyun	  enforcing mode from the beginning, you can reduce the possibility of
56*4882a593Smuzhiyun	  hijacking the boot sequence.
57*4882a593Smuzhiyun
58*4882a593Smuzhiyunconfig SECURITY_TOMOYO_POLICY_LOADER
59*4882a593Smuzhiyun	string "Location of userspace policy loader"
60*4882a593Smuzhiyun	default "/sbin/tomoyo-init"
61*4882a593Smuzhiyun	depends on SECURITY_TOMOYO
62*4882a593Smuzhiyun	depends on !SECURITY_TOMOYO_OMIT_USERSPACE_LOADER
63*4882a593Smuzhiyun	help
64*4882a593Smuzhiyun	  This is the default pathname of policy loader which is called before
65*4882a593Smuzhiyun	  activation. You can override this setting via TOMOYO_loader= kernel
66*4882a593Smuzhiyun	  command line option.
67*4882a593Smuzhiyun
68*4882a593Smuzhiyunconfig SECURITY_TOMOYO_ACTIVATION_TRIGGER
69*4882a593Smuzhiyun	string "Trigger for calling userspace policy loader"
70*4882a593Smuzhiyun	default "/sbin/init"
71*4882a593Smuzhiyun	depends on SECURITY_TOMOYO
72*4882a593Smuzhiyun	depends on !SECURITY_TOMOYO_OMIT_USERSPACE_LOADER
73*4882a593Smuzhiyun	help
74*4882a593Smuzhiyun	  This is the default pathname of activation trigger.
75*4882a593Smuzhiyun	  You can override this setting via TOMOYO_trigger= kernel command line
76*4882a593Smuzhiyun	  option. For example, if you pass init=/bin/systemd option, you may
77*4882a593Smuzhiyun	  want to also pass TOMOYO_trigger=/bin/systemd option.
78*4882a593Smuzhiyun
79*4882a593Smuzhiyunconfig SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING
80*4882a593Smuzhiyun	bool "Use insecure built-in settings for fuzzing tests."
81*4882a593Smuzhiyun	default n
82*4882a593Smuzhiyun	depends on SECURITY_TOMOYO
83*4882a593Smuzhiyun	select SECURITY_TOMOYO_OMIT_USERSPACE_LOADER
84*4882a593Smuzhiyun	help
85*4882a593Smuzhiyun	  Enabling this option forces minimal built-in policy and disables
86*4882a593Smuzhiyun	  domain/program checks for run-time policy modifications. Please enable
87*4882a593Smuzhiyun	  this option only if this kernel is built for doing fuzzing tests.
88