linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com
Subject: [PATCH 0/3] arm64: trivial constification patches
Date: Tue, 13 Aug 2019 15:16:36 +0100	[thread overview]
Message-ID: <20190813141639.13476-1-mark.rutland@arm.com> (raw)

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

             reply	other threads:[~2019-08-13 14:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13 14:16 Mark Rutland [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190813141639.13476-1-mark.rutland@arm.com \
    --to=mark.rutland@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).