riscv: Add ARCH_HAS_FORTIFY_SOURCE
authorKefeng Wang <wangkefeng.wang@huawei.com>
Thu, 25 Feb 2021 07:03:03 +0000 (15:03 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Wed, 10 Mar 2021 02:18:31 +0000 (18:18 -0800)
commit9530141455c968938a913d602a236c2a7b0322e1
tree6f4da9f0d64521493129809c7e9b7b2787a09b34
parentf6e5aedf470bd4522732595a85688052e3cbc03f
riscv: Add ARCH_HAS_FORTIFY_SOURCE

FORTIFY_SOURCE could detect various overflows at compile and run time.
ARCH_HAS_FORTIFY_SOURCE means that the architecture can be built and
run with CONFIG_FORTIFY_SOURCE. Select it in RISCV.

See more about this feature from commit 6974f0c4555e
("include/linux/string.h: add the option of fortified string.h functions").

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kconfig
arch/riscv/include/asm/string.h