All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] selinux: runtime disable is deprecated, add some ssleep() discomfort
@ 2020-06-02 12:47 Paul Moore
  2020-06-02 12:49 ` Paul Moore
  0 siblings, 1 reply; 29+ messages in thread
From: Paul Moore @ 2020-06-02 12:47 UTC (permalink / raw)
  To: selinux

We deprecated the SELinux runtime disable functionality in Linux
v5.6, add a five second sleep to anyone using it to help draw their
attention to the deprecation.

Signed-off-by: Paul Moore <paul@paul-moore.com>
---
 security/selinux/selinuxfs.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index 4781314c2510..07af1334d9c9 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -30,6 +30,7 @@
 #include <linux/uaccess.h>
 #include <linux/kobject.h>
 #include <linux/ctype.h>
+#include <linux/delay.h>
 
 /* selinuxfs pseudo filesystem for exporting the security policy API.
    Based on the proc code and the fs/nfsd/nfsctl.c code. */
@@ -287,6 +288,7 @@ 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");
+	ssleep(5);
 
 	if (count >= PAGE_SIZE)
 		return -ENOMEM;


^ permalink raw reply related	[flat|nested] 29+ messages in thread
* [RFC PATCH] selinux: runtime disable is deprecated, add some ssleep() discomfort
@ 2022-03-01 22:53 Paul Moore
  2022-03-01 22:57 ` Paul Moore
                   ` (2 more replies)
  0 siblings, 3 replies; 29+ messages in thread
From: Paul Moore @ 2022-03-01 22:53 UTC (permalink / raw)
  To: selinux

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 <paul@paul-moore.com>
---
 security/selinux/selinuxfs.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index f2f6203e0fff..3739155ee0db 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -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;


^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2022-04-04 21:37 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02 12:47 [RFC PATCH] selinux: runtime disable is deprecated, add some ssleep() discomfort Paul Moore
2020-06-02 12:49 ` Paul Moore
2020-06-04 14:49   ` Stephen Smalley
2020-06-08 21:35     ` Paul Moore
2020-06-08 22:13       ` Stephen Smalley
2020-06-08 22:56         ` William Roberts
2020-06-10 14:03         ` Stephen Smalley
2020-06-10 14:11           ` Stephen Smalley
2020-06-11 13:29             ` Ondrej Mosnacek
2020-06-12 19:28               ` Paul Moore
2020-08-19 17:14                 ` Petr Lautrbach
2020-08-19 19:07                   ` Stephen Smalley
2020-08-19 19:16                     ` Stephen Smalley
2020-08-20 15:41                       ` Casey Schaufler
2020-08-20 16:58                       ` Stephen Smalley
2020-08-20 20:31                         ` Petr Lautrbach
2020-09-10 11:39                     ` Ondrej Mosnacek
2020-09-10 12:33                       ` Stephen Smalley
2020-09-23 18:32                         ` Paul Moore
2020-09-24 23:42                           ` Stephen Smalley
2020-09-10 13:31                       ` Stephen Smalley
2020-09-10 14:36                         ` Stephen Smalley
2020-09-10 14:54                           ` Stephen Smalley
2020-06-12 19:00             ` Paul Moore
2020-06-12 18:56         ` Paul Moore
2022-03-01 22:53 Paul Moore
2022-03-01 22:57 ` Paul Moore
2022-03-01 23:02 ` Casey Schaufler
2022-04-04 20:23 ` Paul Moore

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.