selinux: runtime disable is deprecated, add some ssleep() discomfort
Paul Moore
maintainerRFC PATCH 1/1 selinux: runtime disable is deprecated, add some ssleep() discomfort
We deprecated the SELinux runtime disable functionality in Linux v5.6, and it is time to get a bit more serious about removing it. Add a five second sleep to anyone using it to help draw their attention to the deprecation and provide a URL which helps explain things in more detail, including how to add kernel command line parameters to some of the more popular Linux distributions.
--- security/selinux/selinuxfs.c | 2 ++ 1 file changed, 2 insertions(+)
security/selinux/selinuxfs.c +2 -0
@@ -293,6 +293,8 @@ static ssize_t sel_write_disable(struct file *file, const char __user *buf,* kernel releases until eventually it is removed */ pr_err ("SELinux: Runtime disable is deprecated, use selinux=0 on the kernel cmdline.\n" ); +pr_err ("SELinux: https://github.com/SELinuxProject/selinux-kernel/wiki/DEPRECATE-runtime-disable\n" ); +ssleep (5 );if (count >=PAGE_SIZE )return -ENOMEM ;
Paul Moore
maintainerQuoted 8 lines · Paul Moore
We deprecated the SELinux runtime disable functionality in Linux v5.6, and it is time to get a bit more serious about removing it. Add a five second sleep to anyone using it to help draw their attention to the deprecation and provide a URL which helps explain things in more detail, including how to add kernel command line parameters to some of the more popular Linux distributions.
Quoted 4 lines
Signed-off-by Paul Moore <[email protected]>--- security/selinux/selinuxfs.c | 2 ++ 1 file changed, 2 insertions(+)
Comments are also welcome on the text in the URL shown as part of the error message below.
Quoted 14 lines
security/selinux/selinuxfs.c +2
-0@@ -293,6 +293,8 @@ static ssize_t sel_write_disable(struct file *file, const char __user *buf,* kernel releases until eventually it is removed */ pr_err ("SELinux: Runtime disable is deprecated, use selinux=0 on the kernel cmdline.\n" ); +pr_err ("SELinux: https://github.com/SELinuxProject/selinux-kernel/wiki/DEPRECATE-runtime-disable\n" ); +ssleep (5 );if (count >=PAGE_SIZE )return -ENOMEM ;
Signature · 1 line
paul-moore.com
Quoted 8 lines · Paul Moore
We deprecated the SELinux runtime disable functionality in Linux v5.6, and it is time to get a bit more serious about removing it. Add a five second sleep to anyone using it to help draw their attention to the deprecation and provide a URL which helps explain things in more detail, including how to add kernel command line parameters to some of the more popular Linux distributions.
Signed-off-by Paul Moore <[email protected]>
Thank you for pressing on this. FWIW -
Quoted 18 lines
--- security/selinux/selinuxfs.c | 2 ++ 1 file changed, 2 insertions(+)security/selinux/selinuxfs.c +2
-0@@ -293,6 +293,8 @@ static ssize_t sel_write_disable(struct file *file, const char __user *buf,* kernel releases until eventually it is removed */ pr_err ("SELinux: Runtime disable is deprecated, use selinux=0 on the kernel cmdline.\n" ); +pr_err ("SELinux: https://github.com/SELinuxProject/selinux-kernel/wiki/DEPRECATE-runtime-disable\n" ); +ssleep (5 );if (count >=PAGE_SIZE )return -ENOMEM ;
Quoted 8 lines · Paul Moore
We deprecated the SELinux runtime disable functionality in Linux v5.6, and it is time to get a bit more serious about removing it. Add a five second sleep to anyone using it to help draw their attention to the deprecation and provide a URL which helps explain things in more detail, including how to add kernel command line parameters to some of the more popular Linux distributions.
Quoted 4 lines
Signed-off-by Paul Moore <[email protected]>--- security/selinux/selinuxfs.c | 2 ++ 1 file changed, 2 insertions(+)
Merged into selinux/next.
Signature · 1 line
paul-moore.com