Skip to contentSkip to conversation

selinux: increase the deprecation sleep for checkreqprot and runtime disable

RFC PATCH In review Paul Moore 2 participants 5 messages Sep 23, 2022 – Oct 17, 2022 SELinux security module

lore
Share & tools
lore

Paul Moore

author maintainer
#0 lore raw

RFC PATCH 1/1 selinux: increase the deprecation sleep for checkreqprot and runtime disable

Further the checkreqprot and runtime disable deprecation efforts by increasing the sleep time from 5 to 15 seconds to help make this more noticeable for any users who are still using these knobs.

---
 security/selinux/selinuxfs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
security/selinux/selinuxfs.c +2 -2
index a00d191394365..0a6894cdc54d9 100644
@@ -294,7 +294,7 @@ static ssize_t sel_write_disable(struct file *file, const char __user *buf,
 	 */
 	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);
+	ssleep(15);
 
 	if (count >= PAGE_SIZE)
 		return -ENOMEM;
@@ -763,7 +763,7 @@ static ssize_t sel_write_checkreqprot(struct file *file, const char __user *buf,
 
 	checkreqprot_set(fsi->state, (new_value ? 1 : 0));
 	if (new_value)
-		ssleep(5);
+		ssleep(15);
 	length = count;
 
 	selinux_ima_measure_state(fsi->state);
author maintainer
#1 lore raw
Quoted 9 lines · Paul Moore

Further the checkreqprot and runtime disable deprecation efforts by increasing the sleep time from 5 to 15 seconds to help make this more noticeable for any users who are still using these knobs.

---
 security/selinux/selinuxfs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

As a FYI, assuming no objections, this would be merged into selinux/next *after* the upcoming merge window closes.

Signature · 1 line
paul-moore.com
author maintainer
#2 lore raw
Quoted 6 lines · Paul Moore
Quoted 5 lines · Paul Moore

Further the checkreqprot and runtime disable deprecation efforts by increasing the sleep time from 5 to 15 seconds to help make this more noticeable for any users who are still using these knobs.

Quoted 7 lines
Quoted 4 lines
---
 security/selinux/selinuxfs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

As a FYI, assuming no objections, this would be merged into selinux/next *after* the upcoming merge window closes.

I just merged this into selinux/next.

Signature · 1 line
paul-moore.com
Acked-by on v1 1/1
#3 lore raw
In reply to Paul Moore
Quoted 5 lines · Paul Moore

Further the checkreqprot and runtime disable deprecation efforts by increasing the sleep time from 5 to 15 seconds to help make this more noticeable for any users who are still using these knobs.

To the extent it matters,

Quoted 27 lines
---
 security/selinux/selinuxfs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
security/selinux/selinuxfs.c +2 -2
index a00d191394365..0a6894cdc54d9 100644
@@ -294,7 +294,7 @@ static ssize_t sel_write_disable(struct file *file, const char __user *buf,
 	 */
 	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);
+	ssleep(15);
 
 	if (count >= PAGE_SIZE)
 		return -ENOMEM;
@@ -763,7 +763,7 @@ static ssize_t sel_write_checkreqprot(struct file *file, const char __user *buf,
 
 	checkreqprot_set(fsi->state, (new_value ? 1 : 0));
 	if (new_value)
-		ssleep(5);
+		ssleep(15);
 	length = count;
 
 	selinux_ima_measure_state(fsi->state);
author maintainer
#4 lore raw
Quoted 11 lines · Casey Schaufler
Quoted 5 lines · Paul Moore

Further the checkreqprot and runtime disable deprecation efforts by increasing the sleep time from 5 to 15 seconds to help make this more noticeable for any users who are still using these knobs.

To the extent it matters,

Reviews *always* matter, even if sometimes the resulting conclusions are determined by the majority to be flawed[1].

[1] This is not the case here, but some folks love to weaponize quotes from the archives so I find it best to qualify absolute statements such as this one.

Signature · 1 line
paul-moore.com