[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211026224354.GA13009@raspberrypi>
Date: Tue, 26 Oct 2021 23:43:54 +0100
From: Austin Kim <austindh.kim@...il.com>
To: zohar@...ux.ibm.com, jmorris@...ei.org, serge@...lyn.com
Cc: linux-integrity@...r.kernel.org,
linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org, austin.kim@....com,
kernel-team@....com
Subject: [PATCH] ima/evm: mark evm_fixmode as __ro_after_init
From: Austin Kim <austin.kim@....com>
evm_fixmode global variable is never modified
outside initcalls, so declaring it with __ro_after_init is better.
Signed-off-by: Austin Kim <austin.kim@....com>
---
security/integrity/evm/evm_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c
index 1c8435dfabee..08f907382c61 100644
--- a/security/integrity/evm/evm_main.c
+++ b/security/integrity/evm/evm_main.c
@@ -78,7 +78,7 @@ static struct xattr_list evm_config_default_xattrnames[] = {
LIST_HEAD(evm_config_xattrnames);
-static int evm_fixmode;
+static int evm_fixmode __ro_after_init;
static int __init evm_set_fixmode(char *str)
{
if (strncmp(str, "fix", 3) == 0)
--
2.20.1
Powered by blists - more mailing lists