selinux/libselinux/man
Ondrej Mosnacek 02f302fc5b selinux_restorecon: introduce selinux_restorecon_parallel(3)
Refactor selinux_restorecon(3) to allow for distributing the relabeling
to multiple threads and add a new function
selinux_restorecon_parallel(3), which allows specifying the number of
threads to use. The existing selinux_restorecon(3) function maintains
the same interface and maintains the same behavior (i.e. relabeling is
done on a single thread).

The parallel implementation takes a simple approach of performing all
the directory tree traversal in a critical section and only letting the
relabeling of individual objects run in parallel. Thankfully, this
approach turns out to be efficient enough in practice, as shown by
restorecon benchmarks (detailed in a subsequent patch that switches
setfiles & restorecon to use selinux_restorecon_parallel(3)).

Note that to be able to use the parallelism, the calling application/
library must be explicitly linked to the libpthread library (statically
or dynamically). This is necessary to mantain the requirement that
libselinux shouldn't explicitly link with libpthread. (I don't know what
exactly was the reason behind this requirement as the commit logs are
fuzzy, but special care has been taken in the past to maintain it, so I
didn't want to break it...)

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
2021-11-23 10:03:18 +01:00
..
man3 selinux_restorecon: introduce selinux_restorecon_parallel(3) 2021-11-23 10:03:18 +01:00
man5 selinux(8,5): Describe fcontext regular expressions 2021-02-19 15:18:05 +01:00
man8 selinux.8: document how mount flag nosuid affects SELinux 2021-06-18 16:44:50 +02:00
ru libselinux: Fix Ru translation of failsafe context 2020-02-21 09:12:23 +01:00
Makefile Allow installing translated man pages 2019-01-28 12:03:57 +01:00