From patchwork Tue Aug 13 14:16:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 11092329 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BC39D14F7 for ; Tue, 13 Aug 2019 14:18:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB35C2845C for ; Tue, 13 Aug 2019 14:18:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D478284D2; Tue, 13 Aug 2019 14:18:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4380A2845C for ; Tue, 13 Aug 2019 14:18:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=z1ArJD9KjjJvWal6wonjkibX8vo9BrSUcb6VqIsCwPE=; b=BlP ZwWVb7xSFxqBXKvtkYDTZB6Tmcr9PyfzQpCsCY2Oo93JrLp5s8J88spIV0kaGeCaarhPkvcUhgHwp Dutm/J6Luruy2TWGSASUKt4O0qH4wsgeMB6bczg1im2XFAPP4Rwlu07q62d/nuEvFMcBaGcyIhFeK ebM7AgYILTkiPmJ75YNBycVOr7GdRBZ/Zj5VE9yB/ZqvyqZymImGIXfmWotqko4+MEm/bpqbPxidR CeqJ1qrt0O/5Vx05n2FpYTkzN1jczbygcG1B5qV4xh7dltTVZWVxxTMt2DAZk//n7bPf/ZYDQiFP/ 6RSfLRJB3viq7l+Mh+45trY8kMgRvRg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hxXca-0005XU-90; Tue, 13 Aug 2019 14:17:56 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hxXbV-0004yg-Oi for linux-arm-kernel@lists.infradead.org; Tue, 13 Aug 2019 14:16:51 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E2945344; Tue, 13 Aug 2019 07:16:43 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 30D0A3F706; Tue, 13 Aug 2019 07:16:43 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/3] arm64: trivial constification patches Date: Tue, 13 Aug 2019 15:16:36 +0100 Message-Id: <20190813141639.13476-1-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190813_071650_033667_4EECD07E X-CRM114-Status: UNSURE ( 8.59 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP I spotted a few arrays under arm64 that we can mark const, as their contents are never intentionally modified at runtime. Doing this will make it a bit easier to spot bugs, and (in the case of sys64_hook) will make it marginally harder to get the kernel to execute the wrong thing. Our crypto algorithm and undef_hook arrays all have runtime-modified state, so these cannot be made const. Thanks, Mark. Mark Rutland (3): arm64: constify icache_policy_str[] arm64: constify aarch64_insn_encoding_class[] arm64: constify sys64_hook instances arch/arm64/kernel/cpuinfo.c | 2 +- arch/arm64/kernel/insn.c | 2 +- arch/arm64/kernel/traps.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-)