Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D303DC433EF for ; Wed, 24 Nov 2021 12:33:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245280AbhKXMgQ (ORCPT ); Wed, 24 Nov 2021 07:36:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:43946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343989AbhKXMaU (ORCPT ); Wed, 24 Nov 2021 07:30:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1C00B61350; Wed, 24 Nov 2021 12:18:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637756312; bh=kZrN9lm84TALyVpqvd6PHuaL0sn2TD2HJRE2iW/VzNw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ECicOsywbd68QLLUC5UK1tjw9JvJCpfWOZ8OJyQXmuIKLLbLlWmG8S053T3ACItpw cwNgwpO55at3o4J9GKpVoiOA3NLCXJyYLASQwFVs+F6pNJfr5g6s+SZwRULulSICde 7lDDLbm6RcwO9DJwhFUybkkw2eGaCsi0EtHxfE1c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Austin Kim , Mimi Zohar Subject: [PATCH 4.14 043/251] evm: mark evm_fixmode as __ro_after_init Date: Wed, 24 Nov 2021 12:54:45 +0100 Message-Id: <20211124115711.732566027@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115710.214900256@linuxfoundation.org> References: <20211124115710.214900256@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Austin Kim commit 32ba540f3c2a7ef61ed5a577ce25069a3d714fc9 upstream. 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 Cc: stable@vger.kernel.org Signed-off-by: Mimi Zohar Signed-off-by: Greg Kroah-Hartman --- security/integrity/evm/evm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/security/integrity/evm/evm_main.c +++ b/security/integrity/evm/evm_main.c @@ -56,7 +56,7 @@ char *evm_config_xattrnames[] = { NULL }; -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)