Lines Matching refs:meta
105 static void kfence_print_stack(struct seq_file *seq, const struct kfence_metadata *meta, in kfence_print_stack() argument
108 const struct kfence_track *track = show_alloc ? &meta->alloc_track : &meta->free_track; in kfence_print_stack()
129 void kfence_print_object(struct seq_file *seq, const struct kfence_metadata *meta) in kfence_print_object() argument
131 const int size = abs(meta->size); in kfence_print_object()
132 const unsigned long start = meta->addr; in kfence_print_object()
133 const struct kmem_cache *const cache = meta->cache; in kfence_print_object()
135 lockdep_assert_held(&meta->lock); in kfence_print_object()
137 if (meta->state == KFENCE_OBJECT_UNUSED) { in kfence_print_object()
138 seq_con_printf(seq, "kfence-#%td unused\n", meta - kfence_metadata); in kfence_print_object()
143 meta - kfence_metadata, (void *)start, (void *)(start + size - 1), in kfence_print_object()
146 kfence_print_stack(seq, meta, true); in kfence_print_object()
148 if (meta->state == KFENCE_OBJECT_FREED) { in kfence_print_object()
150 kfence_print_stack(seq, meta, false); in kfence_print_object()
159 const struct kfence_metadata *meta) in print_diff_canary() argument
165 end = (const u8 *)(address < meta->addr ? min(show_until_addr, meta->addr) in print_diff_canary()
186 const struct kfence_metadata *meta, enum kfence_error_type type) in kfence_report_error() argument
189 const ptrdiff_t object_index = meta ? meta - kfence_metadata : -1; in kfence_report_error()
201 if (WARN_ON(type != KFENCE_ERROR_INVALID && !meta)) in kfence_report_error()
204 if (meta) in kfence_report_error()
205 lockdep_assert_held(&meta->lock); in kfence_report_error()
221 const bool left_of_object = address < meta->addr; in kfence_report_error()
227 left_of_object ? meta->addr - address : address - meta->addr, in kfence_report_error()
240 print_diff_canary(address, 16, meta); in kfence_report_error()
259 if (meta) { in kfence_report_error()
261 kfence_print_object(NULL, meta); in kfence_report_error()
295 struct kfence_metadata *meta = addr_to_metadata((unsigned long)object); in __kfence_obj_info() local
298 if (!meta) in __kfence_obj_info()
308 if (WARN_ON(meta->state == KFENCE_OBJECT_UNUSED)) in __kfence_obj_info()
311 raw_spin_lock_irqsave(&meta->lock, flags); in __kfence_obj_info()
314 kpp->kp_slab_cache = meta->cache; in __kfence_obj_info()
315 kpp->kp_objp = (void *)meta->addr; in __kfence_obj_info()
316 kfence_to_kp_stack(&meta->alloc_track, kpp->kp_stack); in __kfence_obj_info()
317 if (meta->state == KFENCE_OBJECT_FREED) in __kfence_obj_info()
318 kfence_to_kp_stack(&meta->free_track, kpp->kp_free_stack); in __kfence_obj_info()
322 raw_spin_unlock_irqrestore(&meta->lock, flags); in __kfence_obj_info()