Lines Matching full:object

133 void __kasan_unpoison_new_object(struct kmem_cache *cache, void *object);
135 * kasan_unpoison_new_object - Temporarily unpoison a new slab object.
136 * @cache: Cache the object belong to.
137 * @object: Pointer to the object.
140 * temporarily unpoisons an object from a newly allocated slab without doing
141 * anything else. The object must later be repoisoned by
145 void *object) in kasan_unpoison_new_object() argument
148 __kasan_unpoison_new_object(cache, object); in kasan_unpoison_new_object()
151 void __kasan_poison_new_object(struct kmem_cache *cache, void *object);
153 * kasan_unpoison_new_object - Repoison a new slab object.
154 * @cache: Cache the object belong to.
155 * @object: Pointer to the object.
158 * repoisons an object that was previously unpoisoned by
162 void *object) in kasan_poison_new_object() argument
165 __kasan_poison_new_object(cache, object); in kasan_poison_new_object()
169 const void *object);
171 struct kmem_cache *cache, const void *object) in kasan_init_slab_obj() argument
174 return __kasan_init_slab_obj(cache, object); in kasan_init_slab_obj()
175 return (void *)object; in kasan_init_slab_obj()
178 bool __kasan_slab_pre_free(struct kmem_cache *s, void *object,
181 * kasan_slab_pre_free - Check whether freeing a slab object is safe.
182 * @object: Object to be freed.
184 * This function checks whether freeing the given object is safe. It may
189 * @Return true if freeing the object is unsafe; false otherwise.
192 void *object) in kasan_slab_pre_free() argument
195 return __kasan_slab_pre_free(s, object, _RET_IP_); in kasan_slab_pre_free()
199 bool __kasan_slab_free(struct kmem_cache *s, void *object, bool init,
202 * kasan_slab_free - Poison, initialize, and quarantine a slab object.
203 * @object: Object to be freed.
204 * @init: Whether to initialize the object.
205 * @still_accessible: Whether the object contents are still accessible.
207 * This function informs that a slab object has been freed and is not
209 * (indicating that the object is in a SLAB_TYPESAFE_BY_RCU cache and an RCU
214 * the object's memory. For other modes, the @init argument is ignored.
216 * This function might also take ownership of the object to quarantine it.
217 * When this happens, KASAN will defer freeing the object to a later
219 * whether KASAN took ownership of the object.
223 * @Return true if KASAN took ownership of the object; false otherwise.
226 void *object, bool init, in kasan_slab_free() argument
230 return __kasan_slab_free(s, object, init, still_accessible); in kasan_slab_free()
242 void *object, gfp_t flags, bool init);
244 struct kmem_cache *s, void *object, gfp_t flags, bool init) in kasan_slab_alloc() argument
247 return __kasan_slab_alloc(s, object, flags, init); in kasan_slab_alloc()
248 return object; in kasan_slab_alloc()
251 void * __must_check __kasan_kmalloc(struct kmem_cache *s, const void *object,
254 const void *object, size_t size, gfp_t flags) in kasan_kmalloc() argument
257 return __kasan_kmalloc(s, object, size, flags); in kasan_kmalloc()
258 return (void *)object; in kasan_kmalloc()
271 void * __must_check __kasan_krealloc(const void *object,
273 static __always_inline void * __must_check kasan_krealloc(const void *object, in kasan_krealloc() argument
277 return __kasan_krealloc(object, new_size, flags); in kasan_krealloc()
278 return (void *)object; in kasan_krealloc()
412 void *object) {} in kasan_unpoison_new_object() argument
414 void *object) {} in kasan_poison_new_object() argument
416 const void *object) in kasan_init_slab_obj() argument
418 return (void *)object; in kasan_init_slab_obj()
421 static inline bool kasan_slab_pre_free(struct kmem_cache *s, void *object) in kasan_slab_pre_free() argument
426 static inline bool kasan_slab_free(struct kmem_cache *s, void *object, in kasan_slab_free() argument
432 static inline void *kasan_slab_alloc(struct kmem_cache *s, void *object, in kasan_slab_alloc() argument
435 return object; in kasan_slab_alloc()
437 static inline void *kasan_kmalloc(struct kmem_cache *s, const void *object, in kasan_kmalloc() argument
440 return (void *)object; in kasan_kmalloc()
446 static inline void *kasan_krealloc(const void *object, size_t new_size, in kasan_krealloc() argument
449 return (void *)object; in kasan_krealloc()
495 /* Tag-based KASAN modes do not use per-object metadata. */