@@ -25,8 +25,9 @@ for more information.
2525
2626Minimum Supported Kernel Version
2727--------------------------------
28- Linux v3.0 (for /sys/fs/selinux mount point directory) for libselinux
29- and anything that uses libselinux to access selinuxfs.
28+ The minimum supported kernel version is Linux v3.0 (for the
29+ /sys/fs/selinux mount point directory) for libselinux and anything
30+ that uses libselinux to access selinuxfs.
3031
3132Note that the policy build toolchain (e.g. libsepol, checkpolicy,
3233checkmodule, secilc, semodule_package/expand/link) does not link with
@@ -35,18 +36,56 @@ Linux kernel version. The policy build toolchain has in the past
3536successfully been built and run on non-Linux platforms as well
3637(e.g. macOS), although this is not officially supported.
3738
38- Minimum Supported Policy Version
39- --------------------------------
40- Kernel policy version 24 (boundary) for the SELinux and Xen
41- targets. Support for this policy version first shipped in libsepol
39+ Minimum Supported Policy Versions
40+ ---------------------------------
41+ The minimum kernel policy version is 24 (boundary) for the SELinux and
42+ Xen targets. Support for this policy version first shipped in libsepol
42432.0.34 (userspace release 20090403), Linux v2.6.28, and Xen
43444.0.0. libsepol dropped support for kernel policy versions older than
444524 starting with libsepol 3.12.
4546
46- Modular policy version 10 (boundary alias). Support for this modular
47- policy version first shipped in libsepol 2.0.35 (userspace release
48- 20090403). libsepol dropped support for modular policies older than 10
49- starting with libsepol 3.12
47+ The minimum modular policy version is 10 (boundary alias). Support for
48+ this modular policy version first shipped in libsepol 2.0.35
49+ (userspace release 20090403). libsepol dropped support for modular
50+ policies older than 10 starting with libsepol 3.12
51+
52+ These minimum policy versions in libsepol affect:
53+ 1 . The policy build toolchain. For example, checkpolicy, checkmodule,
54+ and secilc cannot generate a policy with a version less than the
55+ minimum.
56+ 2 . libselinux and its users. For example, libselinux cannot downgrade a
57+ policy file to a version less than the minimum, and libsemanage cannot
58+ read a binary policy module that was compiled with a version less than
59+ the minimum.
60+ 3 . SELinux policy analysis tools. For example, setools cannot read a
61+ policy with a version less the minimum.
62+ 4 . The Xen hypervisor, which compiles its XSM/Flask policies using
63+ checkpolicy, and only currently supports kernel policy versions 24 and
64+ 30 for the Xen target. Xen does not use binary policy modules so it is
65+ unaffected by changes to the minimum modular policy version.
66+ 5 . Android, which is on kernel policy version 30. There has not been
67+ any need for newer policy version features yet. Android does not use
68+ binary policy modules so it is unaffected by changes to the minimum
69+ modular policy version.
70+
71+ Increasing the minimum kernel policy version for libsepol therefore
72+ prevents generating, loading, or analyzing policies for Linux kernels
73+ or Xen hypervisors that only support a kernel policy version lower
74+ than the new minimum. The minimum kernel policy version should only
75+ be increased when there are no still-supported versions of the Linux
76+ kernel and Xen hypervisor that require a lower kernel policy version.
77+
78+ Increasing the minimum modular policy version for libsepol prevents
79+ generating binary modules for distribution releases that only support
80+ a modular policy version lower than the new minimum, and also prevents
81+ reading and hence using binary modules that were built with a version
82+ lower than the new minimum. This could affect modules originally built
83+ under an older release and carried forward through system upgrades.
84+ The minimum modular policy version should only be increased when there
85+ are no still-supported Linux distributions that require a lower
86+ modular policy version _ and_ any binary modules carried forward
87+ through system upgrades can reasonably be assumed to have required a
88+ rebuild anyway due to major changes to the system policy headers.
5089
5190Installation
5291------------
0 commit comments