diff mbox series

evm: mark evm_fixmode as __ro_after_init

Message ID 20211028112642.GA1110@raspberrypi (mailing list archive)
State New, archived
Headers show
Series evm: mark evm_fixmode as __ro_after_init | expand

Commit Message

Austin Kim Oct. 28, 2021, 11:26 a.m. UTC
From: Austin Kim <austin.kim@lge.com>

The evm_fixmode is only configurable by command-line option and it is never
modified outside initcalls, so declaring it with __ro_after_init is better.

Signed-off-by: Austin Kim <austin.kim@lge.com>
---
 security/integrity/evm/evm_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mimi Zohar Oct. 29, 2021, 1:57 a.m. UTC | #1
On Thu, 2021-10-28 at 12:26 +0100, Austin Kim wrote:
> From: Austin Kim <austin.kim@lge.com>
> 
> The evm_fixmode is only configurable by command-line option and it is never
> modified outside initcalls, so declaring it with __ro_after_init is better.
> 
> Signed-off-by: Austin Kim <austin.kim@lge.com>

Thanks, Austin.  This patch set is now applied to the next-integrity
branch.

Mimi
diff mbox series

Patch

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)