File tree Expand file tree Collapse file tree 2 files changed +29
-29
lines changed Expand file tree Collapse file tree 2 files changed +29
-29
lines changed Original file line number Diff line number Diff line change @@ -303,35 +303,6 @@ do { \
303
303
__WRITE_ONCE(x, val); \
304
304
} while (0)
305
305
306
- #ifdef CONFIG_KASAN
307
- /*
308
- * We can't declare function 'inline' because __no_sanitize_address conflicts
309
- * with inlining. Attempt to inline it may cause a build failure.
310
- * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
311
- * '__maybe_unused' allows us to avoid defined-but-not-used warnings.
312
- */
313
- # define __no_kasan_or_inline __no_sanitize_address notrace __maybe_unused
314
- # define __no_sanitize_or_inline __no_kasan_or_inline
315
- #else
316
- # define __no_kasan_or_inline __always_inline
317
- #endif
318
-
319
- #define __no_kcsan __no_sanitize_thread
320
- #ifdef __SANITIZE_THREAD__
321
- /*
322
- * Rely on __SANITIZE_THREAD__ instead of CONFIG_KCSAN, to avoid not inlining in
323
- * compilation units where instrumentation is disabled.
324
- */
325
- # define __no_kcsan_or_inline __no_kcsan notrace __maybe_unused
326
- # define __no_sanitize_or_inline __no_kcsan_or_inline
327
- #else
328
- # define __no_kcsan_or_inline __always_inline
329
- #endif
330
-
331
- #ifndef __no_sanitize_or_inline
332
- #define __no_sanitize_or_inline __always_inline
333
- #endif
334
-
335
306
static __no_sanitize_or_inline
336
307
unsigned long __read_once_word_nocheck (const void * addr )
337
308
{
Original file line number Diff line number Diff line change @@ -171,6 +171,35 @@ struct ftrace_likely_data {
171
171
*/
172
172
#define noinline_for_stack noinline
173
173
174
+ #ifdef CONFIG_KASAN
175
+ /*
176
+ * We can't declare function 'inline' because __no_sanitize_address conflicts
177
+ * with inlining. Attempt to inline it may cause a build failure.
178
+ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
179
+ * '__maybe_unused' allows us to avoid defined-but-not-used warnings.
180
+ */
181
+ # define __no_kasan_or_inline __no_sanitize_address notrace __maybe_unused
182
+ # define __no_sanitize_or_inline __no_kasan_or_inline
183
+ #else
184
+ # define __no_kasan_or_inline __always_inline
185
+ #endif
186
+
187
+ #define __no_kcsan __no_sanitize_thread
188
+ #ifdef __SANITIZE_THREAD__
189
+ /*
190
+ * Rely on __SANITIZE_THREAD__ instead of CONFIG_KCSAN, to avoid not inlining in
191
+ * compilation units where instrumentation is disabled.
192
+ */
193
+ # define __no_kcsan_or_inline __no_kcsan notrace __maybe_unused
194
+ # define __no_sanitize_or_inline __no_kcsan_or_inline
195
+ #else
196
+ # define __no_kcsan_or_inline __always_inline
197
+ #endif
198
+
199
+ #ifndef __no_sanitize_or_inline
200
+ #define __no_sanitize_or_inline __always_inline
201
+ #endif
202
+
174
203
#endif /* __KERNEL__ */
175
204
176
205
#endif /* __ASSEMBLY__ */
You can’t perform that action at this time.
0 commit comments