[PATCH RFC 18/41] selinux: use fc_init_pseudo() for selinuxfs
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Tue Nov 10 09:26:01 UTC 2026
> Initialize selinuxfs as a pseudo filesystem. This raises SB_I_PSEUDO and
> SB_I_NOEXEC. selinuxfs never holds executables. SB_I_NOEXEC also
> refuses PROT_EXEC mappings but the status and policy files are only
> ever mapped for reading.
>
> But selinuxfs needs device nodes. The kernel replaces file descriptors
> with /sys/fs/selinux/null on exec via dentry_open() which doesn't care
> about SB_I_NODEV. Android init however opens /sys/fs/selinux/null by
> path as /dev/null doesn't exist yet at that point. So clear SB_I_NODEV
> again in sel_fill_super().
>
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110-work-loop-pseudo-v1-0-4c998976c6c7@kernel.org?part=18
More information about the Linux-security-module-archive
mailing list