(Change submitted to FESCo) |
m (Add trackers) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
= SELinux Parallel Autorelabel <!-- The name of your change proposal --> = | = SELinux Parallel Autorelabel <!-- The name of your change proposal --> = | ||
== Summary == | == Summary == | ||
Line 21: | Line 19: | ||
== Current status == | == Current status == | ||
[[Category: | [[Category:ChangeAcceptedF37]] | ||
<!-- When your change proposal page is completed and ready for review and announcement --> | <!-- When your change proposal page is completed and ready for review and announcement --> | ||
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler --> | <!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler --> | ||
Line 41: | Line 39: | ||
* [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/W7CO55STPHPDHT6PEWPQAQXAOZPKOIYD/ devel thread] | * [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/W7CO55STPHPDHT6PEWPQAQXAOZPKOIYD/ devel thread] | ||
* FESCo issue: [https://pagure.io/fesco/issue/2841 #2841] | * FESCo issue: [https://pagure.io/fesco/issue/2841 #2841] | ||
* Tracker bug: | * Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=2114341 #2114341] | ||
* Release notes tracker: | * Release notes tracker: [https://pagure.io/fedora-docs/release-notes/issue/871 #871] | ||
== Detailed Description == | == Detailed Description == |
Latest revision as of 16:42, 2 August 2022
SELinux Parallel Autorelabel
Summary
After a system's SELinux mode is switched from disabled to enabled, or after an administrator runs fixfiles onboot
, SELinux autorelabel will be run in parallel by default.
Owner
- Name: Petr Lautrbach
- Email: plautrba@redhat.com
Current status
- Targeted release: Fedora Linux 37
- Last updated: 2022-08-02
- devel thread
- FESCo issue: #2841
- Tracker bug: #2114341
- Release notes tracker: #871
Detailed Description
SELinux tools restorecon
and fixfiles
recently gained the ability to relabel files in parallel using the -T nthreads
option. This option is currently not used in the automatic relabel after reboot. When users want/need the parallel relabeling they have to specify the option explicitly (e.g. fixfiles -T 0 onboot
). With this change -T 0
(0 == use all available CPU cores) will be the default for fixfiles onboot
and users will have to use fixfiles -T 1 onboot
to force it to use only one thread.
The rationale is that when autorelabel runs, there are no other resource-intensive processes running on the system, so it's fine (and actually better) to use all available parallelism to speed up the task and get to a fully booted system faster.
Feedback
Benefit to Fedora
Faster reboot after switching back to an SELinux enabled system or when triggering autorelabel explicitly. The relabelling time can be reduced up to ~18 times, depending on the number of cores (the upper limit for the speed-up is the number of cores, naturally). To get an idea of the scaling see the upstream commit message introducing the parallel relabelling support.
Scope
- Proposal owners:
- Update
/usr/libexec/selinux/selinux-autorelabel
to use-T 0
by default.
- Update
- Other developers:
- Release engineering: #Releng issue number
- Policies and guidelines: N/A (not needed for this Change)
- Trademark approval: N/A (not needed for this Change)
- Alignment with Objectives:
Upgrade/compatibility impact
How To Test
- boot with SELinux disabled - add
selinux=0
to the kernel command line - reboot
- store the time it took
- run
fixfiles -T 1 onboot
- reboot
- the latter reboot should take longer time
User Experience
Systems should be up and running faster after SELinux autorelabel.
Dependencies
Contingency Plan
- Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
- Contingency deadline: N/A (not a System Wide Change)
- Blocks release? N/A (not a System Wide Change), Yes/No
Documentation
N/A (not a System Wide Change)