Lines Matching defs:object

377 	 * that thus have per-object metadata. Currently, this flag is used in
378 * slab_ksize() to account for per-object metadata when calculating the
379 * size of the accessible memory within the object. Additionally, we use
380 * SLAB_NO_MERGE to prevent merging of caches with per-object metadata.
402 * it in the object. This is the case when:
418 * Otherwise, if the object is large enough to contain free meta,
419 * store it within the object.
428 * object and the end in the redzone. And thus shift the location of
443 * If the object is small and slub_debug is enabled, store free meta
468 const void *object)
472 return (void *)object + cache->kasan_info.alloc_meta_offset;
476 const void *object)
481 return (void *)object + cache->kasan_info.free_meta_offset;
484 void kasan_init_object_meta(struct kmem_cache *cache, const void *object)
488 alloc_meta = kasan_get_alloc_meta(cache, object);
496 * value for the first 8 bytes of a newly allocated object is not
507 static void release_free_meta(const void *object, struct kasan_free_meta *meta)
510 if (*(u8 *)kasan_mem_to_shadow(object) != KASAN_SLAB_FREE_META)
514 *(u8 *)kasan_mem_to_shadow(object) = KASAN_SLAB_FREE;
536 * Records an auxiliary stack trace for the object at @addr and, if @rcu_free
537 * is set, marks the object as pending an RCU-delayed free.
547 void *object;
553 object = nearest_obj(cache, slab, addr);
554 alloc_meta = kasan_get_alloc_meta(cache, object);
574 void kasan_save_alloc_info(struct kmem_cache *cache, void *object, gfp_t flags)
578 alloc_meta = kasan_get_alloc_meta(cache, object);
588 void kasan_save_free_info(struct kmem_cache *cache, void *object)
592 free_meta = kasan_get_free_meta(cache, object);
597 release_free_meta(object, free_meta);
602 *(u8 *)kasan_mem_to_shadow(object) = KASAN_SLAB_FREE_META;