]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit96458ad1ee6631772d905c180ab58d8f5c920b8a
tree1286621ca4c6759d5d9ec1e78af01f72c474c228
parent630b1b8d7503dae410587cdfaca10a122ff34fa5
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