#include <linux/stdarg.h>
#include <linux/kernel.h>
#include <linux/lockdep.h>
#include <linux/math.h>
#include <linux/printk.h>
#include <linux/sched/debug.h>
#include <linux/seq_file.h>
#include <linux/sprintf.h>
#include <linux/stacktrace.h>
#include <linux/string.h>
#include <linux/sched/clock.h>
#include <trace/events/error_report.h>
#include <asm/kfence.h>
#include "kfence.h"
#ifndef ARCH_FUNC_PREFIX
#define ARCH_FUNC_PREFIX …
#endif
__printf(2, 3)
static void seq_con_printf(struct seq_file *seq, const char *fmt, ...)
{ … }
static int get_stack_skipnr(const unsigned long stack_entries[], int num_entries,
const enum kfence_error_type *type)
{ … }
static void kfence_print_stack(struct seq_file *seq, const struct kfence_metadata *meta,
bool show_alloc)
{ … }
void kfence_print_object(struct seq_file *seq, const struct kfence_metadata *meta)
{ … }
static void print_diff_canary(unsigned long address, size_t bytes_to_show,
const struct kfence_metadata *meta)
{ … }
static const char *get_access_type(bool is_write)
{ … }
void kfence_report_error(unsigned long address, bool is_write, struct pt_regs *regs,
const struct kfence_metadata *meta, enum kfence_error_type type)
{ … }
#ifdef CONFIG_PRINTK
static void kfence_to_kp_stack(const struct kfence_track *track, void **kp_stack)
{ … }
bool __kfence_obj_info(struct kmem_obj_info *kpp, void *object, struct slab *slab)
{ … }
#endif