Re: [PATCH 02/27] Add a SysRq option to lift kernel lockdown

From
David Howells <dhowells@redhat.com>
Date
2019-03-07 15:59:39
Also in
lkml
Reply to
Matthew Garrett, 2019-03-06
Matthew Garrett [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+		/* Ban synthetic events from some sysrq functionality */
+		if ((from == SYSRQ_FROM_PROC || from == SYSRQ_FROM_SYNTHETIC) &&
+		    op_p->enable_mask & SYSRQ_DISABLE_USERSPACE)
+			printk("This sysrq operation is disabled from userspace.\n");
 		/*
 		 * Should we check for enabled operations (/proc/sysrq-trigger
 		 * should not) and is the invoked operation enabled?
 		 */
-		if (!check_mask || sysrq_on_mask(op_p->enable_mask)) {
+		if (from == SYSRQ_FROM_KERNEL || sysrq_on_mask(op_p->enable_mask)) {
There's some missing logic here.  Probably an else is missing, but it seems
more than that.

David
Thread (43 messages) 43 messages, 8 authors, last reply 2019-04-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help