|
|
@ -373,7 +373,8 @@ static u8 assign_tag(struct kmem_cache *cache, const void *object, bool new) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void *kasan_init_slab_obj(struct kmem_cache *cache, const void *object) |
|
|
|
void * __must_check kasan_init_slab_obj(struct kmem_cache *cache, |
|
|
|
|
|
|
|
const void *object) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct kasan_alloc_meta *alloc_info; |
|
|
|
struct kasan_alloc_meta *alloc_info; |
|
|
|
|
|
|
|
|
|
|
@ -389,7 +390,8 @@ void *kasan_init_slab_obj(struct kmem_cache *cache, const void *object) |
|
|
|
return (void *)object; |
|
|
|
return (void *)object; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void *kasan_slab_alloc(struct kmem_cache *cache, void *object, gfp_t flags) |
|
|
|
void * __must_check kasan_slab_alloc(struct kmem_cache *cache, void *object, |
|
|
|
|
|
|
|
gfp_t flags) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return kasan_kmalloc(cache, object, cache->object_size, flags); |
|
|
|
return kasan_kmalloc(cache, object, cache->object_size, flags); |
|
|
|
} |
|
|
|
} |
|
|
@ -449,8 +451,8 @@ bool kasan_slab_free(struct kmem_cache *cache, void *object, unsigned long ip) |
|
|
|
return __kasan_slab_free(cache, object, ip, true); |
|
|
|
return __kasan_slab_free(cache, object, ip, true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void *kasan_kmalloc(struct kmem_cache *cache, const void *object, size_t size, |
|
|
|
void * __must_check kasan_kmalloc(struct kmem_cache *cache, const void *object, |
|
|
|
gfp_t flags) |
|
|
|
size_t size, gfp_t flags) |
|
|
|
{ |
|
|
|
{ |
|
|
|
unsigned long redzone_start; |
|
|
|
unsigned long redzone_start; |
|
|
|
unsigned long redzone_end; |
|
|
|
unsigned long redzone_end; |
|
|
@ -482,7 +484,8 @@ void *kasan_kmalloc(struct kmem_cache *cache, const void *object, size_t size, |
|
|
|
} |
|
|
|
} |
|
|
|
EXPORT_SYMBOL(kasan_kmalloc); |
|
|
|
EXPORT_SYMBOL(kasan_kmalloc); |
|
|
|
|
|
|
|
|
|
|
|
void *kasan_kmalloc_large(const void *ptr, size_t size, gfp_t flags) |
|
|
|
void * __must_check kasan_kmalloc_large(const void *ptr, size_t size, |
|
|
|
|
|
|
|
gfp_t flags) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct page *page; |
|
|
|
struct page *page; |
|
|
|
unsigned long redzone_start; |
|
|
|
unsigned long redzone_start; |
|
|
@ -506,7 +509,7 @@ void *kasan_kmalloc_large(const void *ptr, size_t size, gfp_t flags) |
|
|
|
return (void *)ptr; |
|
|
|
return (void *)ptr; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void *kasan_krealloc(const void *object, size_t size, gfp_t flags) |
|
|
|
void * __must_check kasan_krealloc(const void *object, size_t size, gfp_t flags) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct page *page; |
|
|
|
struct page *page; |
|
|
|
|
|
|
|
|
|
|
|