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: <87sentpmq0.wl-kuninori.morimoto.gx@renesas.com>
Date: Tue, 4 Mar 2025 02:13:11 +0000
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: Andy Shevchenko <andy@...nel.org>, Kees Cook <kees@...nel.org>,
	<linux-hardening@...r.kernel.org>, Andy Shevchenko <andy@...nel.org>, Kees
 Cook <kees@...nel.org>, <linux-hardening@...r.kernel.org>
Subject: [PATCH v2 02/10] lib/string_choices: Add str_enabling_disabling() helper

Add str_enabling_disabling() helper to return "enabling" or "disabling"
string literal.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
---
 include/linux/string_choices.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h
index fbbf1e657806..2a6c8df585ea 100644
--- a/include/linux/string_choices.h
+++ b/include/linux/string_choices.h
@@ -29,6 +29,12 @@ static inline const char *str_enabled_disabled(bool v)
 }
 #define str_disabled_enabled(v)		str_enabled_disabled(!(v))
 
+static inline const char *str_enabling_disabling(bool v)
+{
+	return v ? "enabling" : "disabling";
+}
+#define str_disabling_enabling(v)	str_enabling_disabling(!(v))
+
 static inline const char *str_hi_lo(bool v)
 {
 	return v ? "hi" : "lo";
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ