Lines Matching full:object

136 void __kasan_unpoison_new_object(struct kmem_cache *cache, void *object);
138 * kasan_unpoison_new_object - Temporarily unpoison a new slab object.
139 * @cache: Cache the object belong to.
140 * @object: Pointer to the object.
143 * temporarily unpoisons an object from a newly allocated slab without doing
144 * anything else. The object must later be repoisoned by
148 void *object) in kasan_unpoison_new_object() argument
151 __kasan_unpoison_new_object(cache, object); in kasan_unpoison_new_object()
154 void __kasan_poison_new_object(struct kmem_cache *cache, void *object);
156 * kasan_poison_new_object - Repoison a new slab object.
157 * @cache: Cache the object belong to.
158 * @object: Pointer to the object.
161 * repoisons an object that was previously unpoisoned by
165 void *object) in kasan_poison_new_object() argument
168 __kasan_poison_new_object(cache, object); in kasan_poison_new_object()
172 const void *object);
174 struct kmem_cache *cache, const void *object) in kasan_init_slab_obj() argument
177 return __kasan_init_slab_obj(cache, object); in kasan_init_slab_obj()
178 return (void *)object; in kasan_init_slab_obj()
181 bool __kasan_slab_pre_free(struct kmem_cache *s, void *object,
184 * kasan_slab_pre_free - Check whether freeing a slab object is safe.
185 * @object: Object to be freed.
187 * This function checks whether freeing the given object is safe. It may
192 * @Return true if freeing the object is unsafe; false otherwise.
195 void *object) in kasan_slab_pre_free() argument
198 return __kasan_slab_pre_free(s, object, _RET_IP_); in kasan_slab_pre_free()
202 bool __kasan_slab_free(struct kmem_cache *s, void *object, bool init,
205 * kasan_slab_free - Poison, initialize, and quarantine a slab object.
206 * @object: Object to be freed.
207 * @init: Whether to initialize the object.
208 * @still_accessible: Whether the object contents are still accessible.
210 * This function informs that a slab object has been freed and is not
212 * (indicating that the object is in a SLAB_TYPESAFE_BY_RCU cache and an RCU
217 * the object's memory. For other modes, the @init argument is ignored.
219 * This function might also take ownership of the object to quarantine it.
220 * When this happens, KASAN will defer freeing the object to a later
222 * whether KASAN took ownership of the object.
226 * @Return true if KASAN took ownership of the object; false otherwise.
229 void *object, bool init, in kasan_slab_free() argument
233 return __kasan_slab_free(s, object, init, still_accessible); in kasan_slab_free()
245 void *object, gfp_t flags, bool init);
247 struct kmem_cache *s, void *object, gfp_t flags, bool init) in kasan_slab_alloc() argument
250 return __kasan_slab_alloc(s, object, flags, init); in kasan_slab_alloc()
251 return object; in kasan_slab_alloc()
254 void * __must_check __kasan_kmalloc(struct kmem_cache *s, const void *object,
257 const void *object, size_t size, gfp_t flags) in kasan_kmalloc() argument
260 return __kasan_kmalloc(s, object, size, flags); in kasan_kmalloc()
261 return (void *)object; in kasan_kmalloc()
274 void * __must_check __kasan_krealloc(const void *object,
276 static __always_inline void * __must_check kasan_krealloc(const void *object, in kasan_krealloc() argument
280 return __kasan_krealloc(object, new_size, flags); in kasan_krealloc()
281 return (void *)object; in kasan_krealloc()
415 void *object) {} in kasan_unpoison_new_object() argument
417 void *object) {} in kasan_poison_new_object() argument
419 const void *object) in kasan_init_slab_obj() argument
421 return (void *)object; in kasan_init_slab_obj()
424 static inline bool kasan_slab_pre_free(struct kmem_cache *s, void *object) in kasan_slab_pre_free() argument
429 static inline bool kasan_slab_free(struct kmem_cache *s, void *object, in kasan_slab_free() argument
435 static inline void *kasan_slab_alloc(struct kmem_cache *s, void *object, in kasan_slab_alloc() argument
438 return object; in kasan_slab_alloc()
440 static inline void *kasan_kmalloc(struct kmem_cache *s, const void *object, in kasan_kmalloc() argument
443 return (void *)object; in kasan_kmalloc()
449 static inline void *kasan_krealloc(const void *object, size_t new_size, in kasan_krealloc() argument
452 return (void *)object; in kasan_krealloc()
497 /* Tag-based KASAN modes do not use per-object metadata. */