[PATCH] selftests: binderfs: skip the stress test without binderfs
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Fri Sep 25 13:40:31 UTC 2026
> binderfs_stress mounts binderfs and asserts on the first mount, so on
> a kernel without CONFIG_ANDROID_BINDERFS the case fails rather than
> reporting that the filesystem is not there.
>
> Ask /proc/filesystems whether the kernel has it, the way
> supports_filesystem() in the landlock tests and check_resctrlfs_support()
> in the resctrl ones already do, and skip when it does not.
>
> Probing with a mount instead would not work here: the test is meant to
> run unprivileged, and path_mount() rejects an unprivileged caller in
> may_mount() before do_new_mount() ever looks the filesystem type up, so
> the probe would see EPERM whether binderfs is there or not. The child
> would then still reach the real mount inside its userns and fail.
>
> Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260925133435.3635453-1-eva.kurchatova@virtuozzo.com?part=1
More information about the Linux-security-module-archive
mailing list