Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1470386pxb; Thu, 28 Oct 2021 04:29:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3IW8JKNMcccP0Yv4lV8i/hM+ZJSBALmJmanJS21RHe03wPdUXoTJaXBoTx6rk47Nw4Oup X-Received: by 2002:a05:6402:2690:: with SMTP id w16mr5493582edd.372.1635420544603; Thu, 28 Oct 2021 04:29:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635420544; cv=none; d=google.com; s=arc-20160816; b=bSUmDtYb2uMBl6xrEO3lMO/nvLXUuBByN38f1Fw6F1VyAMnzsO2AB7ptAwIvuG5Nvz hR7d81238BEchgNmHRCq7mpM5Xp4PLtBAjwSlS0uHsSXnPNvL7N5LHg7OsDL53VFtDKK WKKL7E7H4R3+vc+VbJNznfA8jz+fmqOriz7ZO1wDfVn+OrA0u/wYrUUQKzPRyUJscyHe X062S7nxvG/4vcoLqnRN/VGuwN51x739X0xUbiXlbo8eQz5ipLK0OenCaLXTypU+LH5e 4Tg+yKlfRjbTK2fHiGss6va2UZg29xwdQY2al36lqjBc/bxff230Fs7rcvPVZ0i+mXji AhhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=IIgzbCmJH6eDmoU6Rqe6z1SlQ1KC0noTe8OtzZG3ZXc=; b=R2SzPZUfuD+eWz/cppTelVOKJi/tTIEKqEpq08Xy/cLGTFRtSpE9I2sXIR7e+WzzR9 Pim08xB2eLZ4gogy8F+kSiuH2y/g0IyI+wBclNWnHkGvZdR4UQC5NX7YQfWTl46dIOBk aLPmK8Z/Cpp81QzxhxOP9O2tBZHfRYiSXEQWHWWYyD4vP3HId5mVTlyFy7Cn28Q1P0CU c+Md1FVvFDqPQH30kNo39Nnq1QwkwsZrygNSCVRkjdk265JlfFTB0GL6AisbIo9WsgEP e7C+VAJi3iqWFpmiLczVpI9o0L6Z9ez1GC9CP7zoBkShgAMv8g4jFwk6XewU/azQZ6AA WtGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UH1ojTWB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c18si4607979ejj.1.2021.10.28.04.28.40; Thu, 28 Oct 2021 04:29:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UH1ojTWB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230180AbhJ1L3R (ORCPT + 99 others); Thu, 28 Oct 2021 07:29:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229868AbhJ1L3P (ORCPT ); Thu, 28 Oct 2021 07:29:15 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F33CC061745; Thu, 28 Oct 2021 04:26:48 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id r2so6035198pgl.10; Thu, 28 Oct 2021 04:26:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=IIgzbCmJH6eDmoU6Rqe6z1SlQ1KC0noTe8OtzZG3ZXc=; b=UH1ojTWBIxdb2Q2DTP4cdVsYkBJ46JX4aOlqk9qcQ1dr/H5hCeSzeDTOmCWhERPTxB JPqJvsAAYTEfszgmTB+0XRpVrKMNu9Io+8ce94JYcp2lB/Zz9KBQ+4KYYy589VU5SmUo K9wrRMhbXvXK4nYR3p02u3LPcX6K4qZzhT1ALYBKZEKN9pGXYhQl2RlkDGomEJuRWFAK Qc7WQnkjOlTaxoRDqihUs7eZnzqDEr9HUZSVu4pzCha4ao1HutC0SlTV8IMxvCYMsGfj kRovxdZZ4/a+GAHk6xMtjJ8PsXkrdYX4BtgYrkt/MDdJ4X0eKBcQfzBdeTXFCcG4gsty sPIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=IIgzbCmJH6eDmoU6Rqe6z1SlQ1KC0noTe8OtzZG3ZXc=; b=qnIWtqoIXUrMU1srsoypTpaG9WATTr54V2F+DsNnd9nT7VSI2F1c+DF/0fFhHIbYIm pVYJC8fIbwdy73goMYuE3kuNb84YitmmNwnh5rRA43OMGjI+b5rDfO7wOJVMuaOi4i5b wqda5uHoCtmS0cA1hQV89S1jHXGSOiOtbR9jz1/Xo5cewPbJ0xFGxKdrQvVEavUjTSwK dbPPnWPSyH1yrbuzRP/t8yaN7pQaUc03anlJYTqzuJy5u4VlddJ7fJdAlbPeNUgi/skB fJGn7K+0QRkrgL9KfyHwBUaemPpVY7PhCb0WhtXaDt3F7AsWfLaymlKPp/SnrtWSMfI0 Ed7w== X-Gm-Message-State: AOAM5302SQGXhMY4ZXv6gjEY7k+H1KuCgTu0fAxUtAIKN4B9iGscsB7j i7w7QTai0ckDximzVQ0FR9Y= X-Received: by 2002:a62:4ed2:0:b0:47b:f2f9:8812 with SMTP id c201-20020a624ed2000000b0047bf2f98812mr3699488pfb.5.1635420407813; Thu, 28 Oct 2021 04:26:47 -0700 (PDT) Received: from raspberrypi ([49.166.114.232]) by smtp.gmail.com with ESMTPSA id m16sm3470309pfk.187.2021.10.28.04.26.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 04:26:47 -0700 (PDT) Date: Thu, 28 Oct 2021 12:26:42 +0100 From: Austin Kim To: zohar@linux.ibm.com, jmorris@namei.org, serge@hallyn.com Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, austin.kim@lge.com Subject: [PATCH] evm: mark evm_fixmode as __ro_after_init Message-ID: <20211028112642.GA1110@raspberrypi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Austin Kim 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 --- 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