Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Andrey Ryabinin | 64f8eba | 2016-05-20 16:59:28 -0700 | [diff] [blame] | 2 | #ifndef _LINUX_KASAN_CHECKS_H |
| 3 | #define _LINUX_KASAN_CHECKS_H |
| 4 | |
| 5 | #ifdef CONFIG_KASAN |
Dmitry Vyukov | f06e8c5 | 2017-06-22 16:14:17 +0200 | [diff] [blame] | 6 | void kasan_check_read(const volatile void *p, unsigned int size); |
| 7 | void kasan_check_write(const volatile void *p, unsigned int size); |
Andrey Ryabinin | 64f8eba | 2016-05-20 16:59:28 -0700 | [diff] [blame] | 8 | #else |
Dmitry Vyukov | f06e8c5 | 2017-06-22 16:14:17 +0200 | [diff] [blame] | 9 | static inline void kasan_check_read(const volatile void *p, unsigned int size) |
| 10 | { } |
| 11 | static inline void kasan_check_write(const volatile void *p, unsigned int size) |
| 12 | { } |
Andrey Ryabinin | 64f8eba | 2016-05-20 16:59:28 -0700 | [diff] [blame] | 13 | #endif |
| 14 | |
| 15 | #endif |