blob: a61dc075e2ce962ca85c7d2a4d2afb6cd6b1e3b2 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Andrey Ryabinin64f8eba2016-05-20 16:59:28 -07002#ifndef _LINUX_KASAN_CHECKS_H
3#define _LINUX_KASAN_CHECKS_H
4
Arnd Bergmannbcf6f552019-03-05 15:41:27 -08005#if defined(__SANITIZE_ADDRESS__) || defined(__KASAN_INTERNAL)
Dmitry Vyukovf06e8c52017-06-22 16:14:17 +02006void kasan_check_read(const volatile void *p, unsigned int size);
7void kasan_check_write(const volatile void *p, unsigned int size);
Andrey Ryabinin64f8eba2016-05-20 16:59:28 -07008#else
Dmitry Vyukovf06e8c52017-06-22 16:14:17 +02009static inline void kasan_check_read(const volatile void *p, unsigned int size)
10{ }
11static inline void kasan_check_write(const volatile void *p, unsigned int size)
12{ }
Andrey Ryabinin64f8eba2016-05-20 16:59:28 -070013#endif
14
15#endif