]> git.baikalelectronics.ru Git - kernel.git/commit
kernfs: The cgroup filesystem also benefits from SB_I_NOEXEC
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 10 Jun 2016 18:03:05 +0000 (13:03 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Thu, 23 Jun 2016 20:41:56 +0000 (15:41 -0500)
commitc1eda19bb118a2adb87adb1fef5bd9ac038dc32f
tree6e49472e6f3efaf11831a4deb82d4e7656702553
parent72514407faba6bdd319015fe4af61c2cbe1b0085
kernfs: The cgroup filesystem also benefits from SB_I_NOEXEC

The cgroup filesystem is in the same boat as sysfs.  No one ever
permits executables of any kind on the cgroup filesystem, and there is
no reasonable future case to support executables in the future.

Therefore move the setting of SB_I_NOEXEC which makes the code proof
against future mistakes of accidentally creating executables from
sysfs to kernfs itself.  Making the code simpler and covering the
sysfs, cgroup, and cgroup2 filesystems.

Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/kernfs/mount.c
fs/sysfs/mount.c