aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/include/asm/processor.h4
-rw-r--r--include/linux/compiler-gcc.h12
-rw-r--r--include/linux/compiler.h2
3 files changed, 3 insertions, 15 deletions
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h
index 302795c47c06..81038ab357ce 100644
--- a/arch/s390/include/asm/processor.h
+++ b/arch/s390/include/asm/processor.h
@@ -236,7 +236,7 @@ static inline unsigned long current_stack_pointer(void)
236 return sp; 236 return sp;
237} 237}
238 238
239static __no_sanitize_address_or_inline unsigned short stap(void) 239static __no_kasan_or_inline unsigned short stap(void)
240{ 240{
241 unsigned short cpu_address; 241 unsigned short cpu_address;
242 242
@@ -330,7 +330,7 @@ static inline void __load_psw(psw_t psw)
330 * Set PSW mask to specified value, while leaving the 330 * Set PSW mask to specified value, while leaving the
331 * PSW addr pointing to the next instruction. 331 * PSW addr pointing to the next instruction.
332 */ 332 */
333static __no_sanitize_address_or_inline void __load_psw_mask(unsigned long mask) 333static __no_kasan_or_inline void __load_psw_mask(unsigned long mask)
334{ 334{
335 unsigned long addr; 335 unsigned long addr;
336 psw_t psw; 336 psw_t psw;
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index c0f5db3a9621..2010493e1040 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -143,18 +143,6 @@
143#define KASAN_ABI_VERSION 3 143#define KASAN_ABI_VERSION 3
144#endif 144#endif
145 145
146/*
147 * Because __no_sanitize_address conflicts with inlining:
148 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
149 * we do one or the other.
150 */
151#ifdef CONFIG_KASAN
152#define __no_sanitize_address_or_inline \
153 __no_sanitize_address __maybe_unused notrace
154#else
155#define __no_sanitize_address_or_inline inline
156#endif
157
158#if GCC_VERSION >= 50100 146#if GCC_VERSION >= 50100
159#define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1 147#define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1
160#endif 148#endif
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 18c80cfa4fc4..06396c1cf127 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -189,7 +189,7 @@ void __read_once_size(const volatile void *p, void *res, int size)
189 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 189 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
190 * '__maybe_unused' allows us to avoid defined-but-not-used warnings. 190 * '__maybe_unused' allows us to avoid defined-but-not-used warnings.
191 */ 191 */
192# define __no_kasan_or_inline __no_sanitize_address __maybe_unused 192# define __no_kasan_or_inline __no_sanitize_address notrace __maybe_unused
193#else 193#else
194# define __no_kasan_or_inline __always_inline 194# define __no_kasan_or_inline __always_inline
195#endif 195#endif