fortify: Make pointer arguments const
authorKees Cook <keescook@chromium.org>
Tue, 8 Feb 2022 22:53:47 +0000 (14:53 -0800)
committerKees Cook <keescook@chromium.org>
Mon, 14 Feb 2022 00:50:07 +0000 (16:50 -0800)
commit0a2b782a00f33e7d06dc43d099fa071ae97bee77
tree3fc7f4fcccd1b9bc99989f3ccef16d519e8cbe8c
parent1c7f4e5c1b6c9d9b508007c141dca77cab9434b4
fortify: Make pointer arguments const

In preparation for using Clang's __pass_object_size attribute, make all
the pointer arguments to the fortified string functions const. Nothing
was changing their values anyway, so this added requirement (needed by
__pass_object_size) requires no code changes and has no impact on
the binary instruction output.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20220208225350.1331628-6-keescook@chromium.org
include/linux/fortify-string.h