Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/3] arm64: trivial constification patches
@ 2019-08-13 14:16 Mark Rutland
  2019-08-13 14:16 ` [PATCH 1/3] arm64: constify icache_policy_str[] Mark Rutland
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mark Rutland @ 2019-08-13 14:16 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: mark.rutland, catalin.marinas, will.deacon

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(-)

-- 
2.11.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13 14:16 [PATCH 0/3] arm64: trivial constification patches Mark Rutland
2019-08-13 14:16 ` [PATCH 1/3] arm64: constify icache_policy_str[] Mark Rutland
2019-08-14  9:07   ` Dave Martin
2019-08-13 14:16 ` [PATCH 2/3] arm64: constify aarch64_insn_encoding_class[] Mark Rutland
2019-08-14  9:10   ` Dave Martin
2019-08-13 14:16 ` [PATCH 3/3] arm64: constify sys64_hook instances Mark Rutland
2019-08-14  9:12   ` Dave Martin

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox