Commit a2ecb233 authored by Dmitry Korotin's avatar Dmitry Korotin Committed by Paul Burton

mips: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE

FORTIFY_SOURCE detects various overflows at compile and run time.
(6974f0c4 ("include/linux/string.h:
add the option of fortified string.h functions)

ARCH_HAS_FORTIFY_SOURCE means that the architecture can be built and
run with CONFIG_FORTIFY_SOURCE.

Since mips can be built and run with that flag,
select ARCH_HAS_FORTIFY_SOURCE as default.
Signed-off-by: default avatarDmitry Korotin <dkorotin@wavecomp.com>
Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
parent ffe59ee3
...@@ -7,6 +7,7 @@ config MIPS ...@@ -7,6 +7,7 @@ config MIPS
select ARCH_CLOCKSOURCE_DATA select ARCH_CLOCKSOURCE_DATA
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
select ARCH_HAS_UBSAN_SANITIZE_ALL select ARCH_HAS_UBSAN_SANITIZE_ALL
select ARCH_HAS_FORTIFY_SOURCE
select ARCH_SUPPORTS_UPROBES select ARCH_SUPPORTS_UPROBES
select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_BUILTIN_BSWAP
select ARCH_USE_CMPXCHG_LOCKREF if 64BIT select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#ifndef _ASM_STRING_H #ifndef _ASM_STRING_H
#define _ASM_STRING_H #define _ASM_STRING_H
#if !defined(__OPTIMIZE__) || !defined(CONFIG_FORTIFY_SOURCE)
/* /*
* Most of the inline functions are rather naive implementations so I just * Most of the inline functions are rather naive implementations so I just
...@@ -130,6 +131,7 @@ strncmp(__const__ char *__cs, __const__ char *__ct, size_t __count) ...@@ -130,6 +131,7 @@ strncmp(__const__ char *__cs, __const__ char *__ct, size_t __count)
return __res; return __res;
} }
#endif /* CONFIG_32BIT */ #endif /* CONFIG_32BIT */
#endif /* !defined(__OPTIMIZE__) || !defined(CONFIG_FORTIFY_SOURCE) */
#define __HAVE_ARCH_MEMSET #define __HAVE_ARCH_MEMSET
extern void *memset(void *__s, int __c, size_t __count); extern void *memset(void *__s, int __c, size_t __count);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment