#define pr_fmt(fmt) …
#define DISABLE_BRANCH_PROFILING
#include <linux/atomic.h>
#include <linux/compiler.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/types.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/hashtable.h>
#include <linux/init.h>
#include <linux/kmsan-checks.h>
#include <linux/mm.h>
#include <linux/preempt.h>
#include <linux/printk.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/vmalloc.h>
#include <linux/debugfs.h>
#include <linux/uaccess.h>
#include <linux/kcov.h>
#include <linux/refcount.h>
#include <linux/log2.h>
#include <asm/setup.h>
#define kcov_debug(fmt, ...) …
#define KCOV_WORDS_PER_CMP …
struct kcov { … };
struct kcov_remote_area { … };
struct kcov_remote { … };
static DEFINE_SPINLOCK(kcov_remote_lock);
static DEFINE_HASHTABLE(kcov_remote_map, 4);
static struct list_head kcov_remote_areas = …;
struct kcov_percpu_data { … };
static DEFINE_PER_CPU(struct kcov_percpu_data, kcov_percpu_data) = …;
static struct kcov_remote *kcov_remote_find(u64 handle)
{ … }
static struct kcov_remote *kcov_remote_add(struct kcov *kcov, u64 handle)
{ … }
static struct kcov_remote_area *kcov_remote_area_get(unsigned int size)
{ … }
static void kcov_remote_area_put(struct kcov_remote_area *area,
unsigned int size)
{ … }
static inline bool in_softirq_really(void)
{ … }
static notrace bool check_kcov_mode(enum kcov_mode needed_mode, struct task_struct *t)
{ … }
static notrace unsigned long canonicalize_ip(unsigned long ip)
{ … }
void notrace __sanitizer_cov_trace_pc(void)
{ … }
EXPORT_SYMBOL(…);
#ifdef CONFIG_KCOV_ENABLE_COMPARISONS
static void notrace write_comp_data(u64 type, u64 arg1, u64 arg2, u64 ip)
{ … }
void notrace __sanitizer_cov_trace_cmp1(u8 arg1, u8 arg2)
{ … }
EXPORT_SYMBOL(…);
void notrace __sanitizer_cov_trace_cmp2(u16 arg1, u16 arg2)
{ … }
EXPORT_SYMBOL(…);
void notrace __sanitizer_cov_trace_cmp4(u32 arg1, u32 arg2)
{ … }
EXPORT_SYMBOL(…);
void notrace __sanitizer_cov_trace_cmp8(kcov_u64 arg1, kcov_u64 arg2)
{ … }
EXPORT_SYMBOL(…);
void notrace __sanitizer_cov_trace_const_cmp1(u8 arg1, u8 arg2)
{ … }
EXPORT_SYMBOL(…);
void notrace __sanitizer_cov_trace_const_cmp2(u16 arg1, u16 arg2)
{ … }
EXPORT_SYMBOL(…);
void notrace __sanitizer_cov_trace_const_cmp4(u32 arg1, u32 arg2)
{ … }
EXPORT_SYMBOL(…);
void notrace __sanitizer_cov_trace_const_cmp8(kcov_u64 arg1, kcov_u64 arg2)
{ … }
EXPORT_SYMBOL(…);
void notrace __sanitizer_cov_trace_switch(kcov_u64 val, void *arg)
{ … }
EXPORT_SYMBOL(…);
#endif
static void kcov_start(struct task_struct *t, struct kcov *kcov,
unsigned int size, void *area, enum kcov_mode mode,
int sequence)
{ … }
static void kcov_stop(struct task_struct *t)
{ … }
static void kcov_task_reset(struct task_struct *t)
{ … }
void kcov_task_init(struct task_struct *t)
{ … }
static void kcov_reset(struct kcov *kcov)
{ … }
static void kcov_remote_reset(struct kcov *kcov)
{ … }
static void kcov_disable(struct task_struct *t, struct kcov *kcov)
{ … }
static void kcov_get(struct kcov *kcov)
{ … }
static void kcov_put(struct kcov *kcov)
{ … }
void kcov_task_exit(struct task_struct *t)
{ … }
static int kcov_mmap(struct file *filep, struct vm_area_struct *vma)
{ … }
static int kcov_open(struct inode *inode, struct file *filep)
{ … }
static int kcov_close(struct inode *inode, struct file *filep)
{ … }
static int kcov_get_mode(unsigned long arg)
{ … }
static void kcov_fault_in_area(struct kcov *kcov)
{ … }
static inline bool kcov_check_handle(u64 handle, bool common_valid,
bool uncommon_valid, bool zero_valid)
{ … }
static int kcov_ioctl_locked(struct kcov *kcov, unsigned int cmd,
unsigned long arg)
{ … }
static long kcov_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
{ … }
static const struct file_operations kcov_fops = …;
static inline bool kcov_mode_enabled(unsigned int mode)
{ … }
static void kcov_remote_softirq_start(struct task_struct *t)
{ … }
static void kcov_remote_softirq_stop(struct task_struct *t)
{ … }
void kcov_remote_start(u64 handle)
{ … }
EXPORT_SYMBOL(…);
static void kcov_move_area(enum kcov_mode mode, void *dst_area,
unsigned int dst_area_size, void *src_area)
{ … }
void kcov_remote_stop(void)
{ … }
EXPORT_SYMBOL(…);
u64 kcov_common_handle(void)
{ … }
EXPORT_SYMBOL(…);
static int __init kcov_init(void)
{ … }
device_initcall(kcov_init);