mbox series

[0/3] arm64: trivial constification patches

Message ID 20190813141639.13476-1-mark.rutland@arm.com (mailing list archive)
Headers show
Series arm64: trivial constification patches | expand

Message

Mark Rutland Aug. 13, 2019, 2:16 p.m. UTC
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(-)