mirror of https://github.com/OpenIPC/firmware.git
51 lines
1.9 KiB
Diff
51 lines
1.9 KiB
Diff
diff -drupN a/include/linux/kasan.h b/include/linux/kasan.h
|
|
--- a/include/linux/kasan.h 2018-08-06 17:23:04.000000000 +0300
|
|
+++ b/include/linux/kasan.h 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -30,16 +30,10 @@ static inline void *kasan_mem_to_shadow(
|
|
}
|
|
|
|
/* Enable reporting bugs after kasan_disable_current() */
|
|
-static inline void kasan_enable_current(void)
|
|
-{
|
|
- current->kasan_depth++;
|
|
-}
|
|
+extern void kasan_enable_current(void);
|
|
|
|
/* Disable reporting bugs for current task */
|
|
-static inline void kasan_disable_current(void)
|
|
-{
|
|
- current->kasan_depth--;
|
|
-}
|
|
+extern void kasan_disable_current(void);
|
|
|
|
void kasan_unpoison_shadow(const void *address, size_t size);
|
|
|
|
@@ -52,7 +46,7 @@ void kasan_free_pages(struct page *page,
|
|
void kasan_cache_create(struct kmem_cache *cache, size_t *size,
|
|
unsigned long *flags);
|
|
void kasan_cache_shrink(struct kmem_cache *cache);
|
|
-void kasan_cache_destroy(struct kmem_cache *cache);
|
|
+void kasan_cache_shutdown(struct kmem_cache *cache);
|
|
|
|
void kasan_poison_slab(struct page *page);
|
|
void kasan_unpoison_object_data(struct kmem_cache *cache, void *object);
|
|
@@ -81,6 +75,9 @@ size_t ksize(const void *);
|
|
static inline void kasan_unpoison_slab(const void *ptr) { ksize(ptr); }
|
|
size_t kasan_metadata_size(struct kmem_cache *cache);
|
|
|
|
+bool kasan_save_enable_multi_shot(void);
|
|
+void kasan_restore_multi_shot(bool enabled);
|
|
+
|
|
#else /* CONFIG_KASAN */
|
|
|
|
static inline void kasan_unpoison_shadow(const void *address, size_t size) {}
|
|
@@ -98,7 +95,7 @@ static inline void kasan_cache_create(st
|
|
size_t *size,
|
|
unsigned long *flags) {}
|
|
static inline void kasan_cache_shrink(struct kmem_cache *cache) {}
|
|
-static inline void kasan_cache_destroy(struct kmem_cache *cache) {}
|
|
+static inline void kasan_cache_shutdown(struct kmem_cache *cache) {}
|
|
|
|
static inline void kasan_poison_slab(struct page *page) {}
|
|
static inline void kasan_unpoison_object_data(struct kmem_cache *cache,
|