From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 18F08C433F5 for ; Fri, 3 Dec 2021 00:07:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NDQU4zHrOxHZTawbxjWU8mrXLbvDhdCczFraAfWjSZE=; b=Wo26EW5yYrhDnz LpsnloRcghiIMwLmVIS43FqC88N7cP17ZFyz3EufprS9UIzlpyDysatVK4jGjZN2prQ+P934DiHH4 yA7tx+yEj2E+YlLgWacHOFmRDg05uAqrleBvdURGuez65L5Uad0T10/Wz1/ynPr8FvY+2jeQKenpK mddTndrjJMFvuLX6KQL2G+GbcPxex/gruayNHjP4Qd53O49GT7Ok8j2cCsaKpd04Lzl8o5WmEyC7x YQ5l5V6mwhaVUl81DQtpppk8Hh7hxbdOh3keyaKEa8E0eOCaXFG0ly0Usddb3qTTUexSsGVnEXe5V v6YzMicQipJLditEXmgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msw4t-00Dn2Y-WA; Fri, 03 Dec 2021 00:05:28 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1msw4o-00Dn1w-FF for linux-arm-kernel@lists.infradead.org; Fri, 03 Dec 2021 00:05:23 +0000 Received: by mail-pg1-x531.google.com with SMTP id r138so1287224pgr.13 for ; Thu, 02 Dec 2021 16:05:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=YNq71eugKd6ZuFCZ5Q2r4IlEflH5oCQKgCO8j2VOR4k=; b=H6auaOZajr7ROgTJ77RMu5c9CI728HFCUDXBSzUg0dcqmGw5nZW9uLKpjaNa0gIJPh n4Q8vGxTFDb0rWg9sn6/sia0+4Tzvf+ngYQlt1eSdoPOUquA/VXzukgoOOL70gNlKU93 WIf+NTJuJS73F2mvd6QPe84ARcGX056qA7mtA= 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:references :mime-version:content-disposition:in-reply-to; bh=YNq71eugKd6ZuFCZ5Q2r4IlEflH5oCQKgCO8j2VOR4k=; b=xOBse9X98XExoyYT4rWp5bdNmq7EW71XiWgQYzP/jjHXB0ey5tetc86f72Zfj9kljm xr2WI/3Tbe4lNbLrmXjWEj7UjrFHKJ8c36eN5C7wJUjpFDAGUPGMxftfnT6oDF1yta05 38zZgB1G6hUuz4eocn28gqqR9xcNYouR+DsVhZMqFKUKgpYQKIH0zz1usgKYHypgc0ur 8dQm0FDBqzIkCft4a8WJRzj/akRCmj2uOwRSkqZ0Ce61kiYKGuYcLc5Gd2bObOjsyM4y eD1E8NlsZssff7bGO6OvfXF0whzXp8hzK3lIq88vXvC985MdhpdKKLYMNEb9dSZF4u/h 6ECA== X-Gm-Message-State: AOAM533QdGT4aHbz71SSo/jVklJYE0z7yBa8rQyf2OfGNde+fJ99dQTF k+mq/CkWCYai8JuEeB8hDW8XmQ== X-Google-Smtp-Source: ABdhPJwDi9J4NoMa+JuX5RZuz3GYQIOjZ6/MsFXsp/vmnNCdDwz+Gg93EPkstIEsBWo6kVDr5Mbf/A== X-Received: by 2002:a63:2155:: with SMTP id s21mr1956291pgm.20.1638489921114; Thu, 02 Dec 2021 16:05:21 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id mi18sm558085pjb.13.2021.12.02.16.05.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 16:05:20 -0800 (PST) Date: Thu, 2 Dec 2021 16:05:19 -0800 From: Kees Cook To: "Peng Fan (OSS)" Cc: daniel.lezcano@linaro.org, tglx@linutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, van.freenix@gmail.com, Peng Fan Subject: Re: [PATCH 1/2] clocksource/drivers/imx-sysctr: mark two variable with __ro_after_init Message-ID: <202112021604.E65EDA8D6@keescook> References: <20211201125030.2307746-1-peng.fan@oss.nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211201125030.2307746-1-peng.fan@oss.nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211202_160522_589425_53F79FDD X-CRM114-Status: GOOD ( 15.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 01, 2021 at 08:50:29PM +0800, Peng Fan (OSS) wrote: > From: Peng Fan > > sys_ctr_base and cmpcr will not be updated after init, so mark > as __ro_after_init. > > Cc: Kees Cook > Signed-off-by: Peng Fan Always nice to get more of these. :) Reviewed-by: Kees Cook Thanks! -Kees > --- > drivers/clocksource/timer-imx-sysctr.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/clocksource/timer-imx-sysctr.c b/drivers/clocksource/timer-imx-sysctr.c > index 18b90fc56bfc..2b309af11266 100644 > --- a/drivers/clocksource/timer-imx-sysctr.c > +++ b/drivers/clocksource/timer-imx-sysctr.c > @@ -20,8 +20,8 @@ > > #define SYS_CTR_CLK_DIV 0x3 > > -static void __iomem *sys_ctr_base; > -static u32 cmpcr; > +static void __iomem *sys_ctr_base __ro_after_init; > +static u32 cmpcr __ro_after_init; > > static void sysctr_timer_enable(bool enable) > { > -- > 2.25.1 > -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel