s390/speculation: Use statically initialized const for instructions
authorKees Cook <keescook@chromium.org>
Wed, 16 Jun 2021 20:18:23 +0000 (13:18 -0700)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 28 Jun 2021 09:18:28 +0000 (11:18 +0200)
commitc74d3c182ab4a3db6c3c2a6c4b3c8b9a7f1feb1a
tree1286621ca4c6759d5d9ec1e78af01f72c474c228
parente5e1bdf0bca8cd16ad39ed2febf6f689d9c07586
s390/speculation: Use statically initialized const for instructions

In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memcpy(), memmove(), and memset(), avoid
confusing the checks when using a static const source.

Move the static const array into a variable so the compiler can perform
appropriate bounds checking.

Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210616201823.1245603-1-keescook@chromium.org
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/nospec-branch.c