#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kallsyms.h>
#include <linux/types.h>
#include <linux/mutex.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/list.h>
#include <linux/sysctl.h>
#include <linux/ctype.h>
#include <linux/string.h>
#include <linux/parser.h>
#include <linux/string_helpers.h>
#include <linux/uaccess.h>
#include <linux/dynamic_debug.h>
#include <linux/debugfs.h>
#include <linux/slab.h>
#include <linux/jump_label.h>
#include <linux/hardirq.h>
#include <linux/sched.h>
#include <linux/device.h>
#include <linux/netdevice.h>
#include <rdma/ib_verbs.h>
extern struct _ddebug __start___dyndbg[];
extern struct _ddebug __stop___dyndbg[];
extern struct ddebug_class_map __start___dyndbg_classes[];
extern struct ddebug_class_map __stop___dyndbg_classes[];
struct ddebug_table { … };
struct ddebug_query { … };
struct ddebug_iter { … };
struct flag_settings { … };
static DEFINE_MUTEX(ddebug_lock);
static LIST_HEAD(ddebug_tables);
static int verbose;
module_param(verbose, int, 0644);
MODULE_PARM_DESC(…) …;
static inline const char *trim_prefix(const char *path)
{ … }
static const struct { … } opt_array[] = …;
struct flagsbuf { … };
static char *ddebug_describe_flags(unsigned int flags, struct flagsbuf *fb)
{ … }
#define vnpr_info(lvl, fmt, ...) …
#define vpr_info(fmt, ...) …
#define v2pr_info(fmt, ...) …
#define v3pr_info(fmt, ...) …
#define v4pr_info(fmt, ...) …
static void vpr_info_dq(const struct ddebug_query *query, const char *msg)
{ … }
static struct ddebug_class_map *ddebug_find_valid_class(struct ddebug_table const *dt,
const char *class_string, int *class_id)
{ … }
#define __outvar …
static int ddebug_change(const struct ddebug_query *query,
struct flag_settings *modifiers)
{ … }
static int ddebug_tokenize(char *buf, char *words[], int maxwords)
{ … }
static inline int parse_lineno(const char *str, unsigned int *val)
{ … }
static int parse_linerange(struct ddebug_query *query, const char *first)
{ … }
static int check_set(const char **dest, char *src, char *name)
{ … }
static int ddebug_parse_query(char *words[], int nwords,
struct ddebug_query *query, const char *modname)
{ … }
static int ddebug_parse_flags(const char *str, struct flag_settings *modifiers)
{ … }
static int ddebug_exec_query(char *query_string, const char *modname)
{ … }
static int ddebug_exec_queries(char *query, const char *modname)
{ … }
static int ddebug_apply_class_bitmap(const struct ddebug_class_param *dcp,
unsigned long *new_bits, unsigned long *old_bits)
{ … }
#define KP_NAME(kp) …
#define CLASSMAP_BITMASK(width) …
static int param_set_dyndbg_classnames(const char *instr, const struct kernel_param *kp)
{ … }
int param_set_dyndbg_classes(const char *instr, const struct kernel_param *kp)
{ … }
EXPORT_SYMBOL(…);
int param_get_dyndbg_classes(char *buffer, const struct kernel_param *kp)
{ … }
EXPORT_SYMBOL(…);
const struct kernel_param_ops param_ops_dyndbg_classes = …;
EXPORT_SYMBOL(…);
#define PREFIX_SIZE …
static int remaining(int wrote)
{ … }
static char *__dynamic_emit_prefix(const struct _ddebug *desc, char *buf)
{ … }
static inline char *dynamic_emit_prefix(struct _ddebug *desc, char *buf)
{ … }
void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)
{ … }
EXPORT_SYMBOL(…);
void __dynamic_dev_dbg(struct _ddebug *descriptor,
const struct device *dev, const char *fmt, ...)
{ … }
EXPORT_SYMBOL(…);
#ifdef CONFIG_NET
void __dynamic_netdev_dbg(struct _ddebug *descriptor,
const struct net_device *dev, const char *fmt, ...)
{ … }
EXPORT_SYMBOL(…);
#endif
#if IS_ENABLED(CONFIG_INFINIBAND)
void __dynamic_ibdev_dbg(struct _ddebug *descriptor,
const struct ib_device *ibdev, const char *fmt, ...)
{ … }
EXPORT_SYMBOL(…);
#endif
static __init int dyndbg_setup(char *str)
{ … }
__setup(…);
#define USER_BUF_PAGE …
static ssize_t ddebug_proc_write(struct file *file, const char __user *ubuf,
size_t len, loff_t *offp)
{ … }
static struct _ddebug *ddebug_iter_first(struct ddebug_iter *iter)
{ … }
static struct _ddebug *ddebug_iter_next(struct ddebug_iter *iter)
{ … }
static void *ddebug_proc_start(struct seq_file *m, loff_t *pos)
{ … }
static void *ddebug_proc_next(struct seq_file *m, void *p, loff_t *pos)
{ … }
#define class_in_range(class_id, map) …
static const char *ddebug_class_name(struct ddebug_iter *iter, struct _ddebug *dp)
{ … }
static int ddebug_proc_show(struct seq_file *m, void *p)
{ … }
static void ddebug_proc_stop(struct seq_file *m, void *p)
{ … }
static const struct seq_operations ddebug_proc_seqops = …;
static int ddebug_proc_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations ddebug_proc_fops = …;
static const struct proc_ops proc_fops = …;
static void ddebug_attach_module_classes(struct ddebug_table *dt,
struct ddebug_class_map *classes,
int num_classes)
{ … }
static int ddebug_add_module(struct _ddebug_info *di, const char *modname)
{ … }
static int ddebug_dyndbg_param_cb(char *param, char *val,
const char *modname, int on_err)
{ … }
static int ddebug_dyndbg_boot_param_cb(char *param, char *val,
const char *unused, void *arg)
{ … }
int ddebug_dyndbg_module_param_cb(char *param, char *val, const char *module)
{ … }
static void ddebug_table_free(struct ddebug_table *dt)
{ … }
#ifdef CONFIG_MODULES
static int ddebug_remove_module(const char *mod_name)
{ … }
static int ddebug_module_notify(struct notifier_block *self, unsigned long val,
void *data)
{ … }
static struct notifier_block ddebug_module_nb = …;
#endif
static void ddebug_remove_all_tables(void)
{ … }
static __initdata int ddebug_init_success;
static int __init dynamic_debug_init_control(void)
{ … }
static int __init dynamic_debug_init(void)
{ … }
early_initcall(dynamic_debug_init);
fs_initcall(dynamic_debug_init_control);