lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230828102753.4811-5-sebokandris2009@gmail.com>
Date:   Mon, 28 Aug 2023 12:27:56 +0200
From:   Andras Sebok <sebokandris2009@...il.com>
To:     linux-serial@...r.kernel.org
Cc:     andriseseboke@...il.com, linux-kernel@...r.kernel.org,
        jirislaby@...nel.org, gregkh@...uxfoundation.org,
        Andras Sebok <sebokandris2009@...il.com>
Subject: [PATCH 2/2] Add disabled text to indicate inactive commands in sysrq help menu

This patch adds disabled text after disabled commands in sysrq help.

before:
sak : k

after:
sak : k (disabled)

Signed-off-by: Andras Sebok <sebokandris2009@...il.com>
---
 drivers/tty/sysrq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index 831cdadf366f..1af78f76232e 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -617,6 +617,9 @@ void __handle_sysrq(int key, bool check_mask)
 				if (j != i)
 					continue;
 				pr_cont("%s ", sysrq_key_table[i]->help_msg);
+				if (!check_mask || (check_mask &&
+					!sysrq_on_mask(sysrq_key_table[i]->enable_mask)))
+					pr_cont("(disabled)");
 				pr_cont("\n");
 			}
 		}
-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ