Home
last modified time | relevance | path

Searched refs:kfence_metadata (Results 1 – 3 of 3) sorted by relevance

/openbmc/linux/mm/kfence/
H A Dkfence.h54 struct kfence_metadata { struct
105 #define KFENCE_METADATA_SIZE PAGE_ALIGN(sizeof(struct kfence_metadata) * \ argument
108 extern struct kfence_metadata *kfence_metadata;
110 static inline struct kfence_metadata *addr_to_metadata(unsigned long addr) in addr_to_metadata()
128 return &kfence_metadata[index]; in addr_to_metadata()
141 const struct kfence_metadata *meta, enum kfence_error_type type);
143 void kfence_print_object(struct seq_file *seq, const struct kfence_metadata *meta);
H A Dcore.c120 struct kfence_metadata *kfence_metadata __read_mostly;
128 static struct kfence_metadata *kfence_metadata_init __read_mostly;
251 static inline unsigned long metadata_to_pageaddr(const struct kfence_metadata *meta) in metadata_to_pageaddr()
253 unsigned long offset = (meta - kfence_metadata + 1) * PAGE_SIZE * 2; in metadata_to_pageaddr()
259 if (KFENCE_WARN_ON(meta < kfence_metadata || in metadata_to_pageaddr()
260 meta >= kfence_metadata + CONFIG_KFENCE_NUM_OBJECTS)) in metadata_to_pageaddr()
278 metadata_update_state(struct kfence_metadata *meta, enum kfence_object_state next, in metadata_update_state()
312 struct kfence_metadata *meta; in check_canary_byte()
328 static inline void set_canary(const struct kfence_metadata *meta) in set_canary()
345 static inline void check_canary(const struct kfence_metadata *meta) in check_canary()
[all …]
H A Dreport.c105 static void kfence_print_stack(struct seq_file *seq, const struct kfence_metadata *meta, in kfence_print_stack()
129 void kfence_print_object(struct seq_file *seq, const struct kfence_metadata *meta) 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()
159 const struct kfence_metadata *meta) in print_diff_canary()
186 const struct kfence_metadata *meta, enum kfence_error_type type) in kfence_report_error()
189 const ptrdiff_t object_index = meta ? meta - kfence_metadata : -1; in kfence_report_error()
295 struct kfence_metadata *meta = addr_to_metadata((unsigned long)object); in __kfence_obj_info()