mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 00:43:12 +00:00
Memory access coded in an assembly won't be seen by KASAN as a compiler can instrument only C code. Add kasan_check_[read,write]() API which is going to be used to check a certain memory range. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Andrey Ryabinin <[email protected]> Acked-by: Alexander Potapenko <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
13 lines
366 B
C
13 lines
366 B
C
#ifndef _LINUX_KASAN_CHECKS_H
|
|
#define _LINUX_KASAN_CHECKS_H
|
|
|
|
#ifdef CONFIG_KASAN
|
|
void kasan_check_read(const void *p, unsigned int size);
|
|
void kasan_check_write(const void *p, unsigned int size);
|
|
#else
|
|
static inline void kasan_check_read(const void *p, unsigned int size) { }
|
|
static inline void kasan_check_write(const void *p, unsigned int size) { }
|
|
#endif
|
|
|
|
#endif
|