#ifndef _LINUX_FPROBE_H
#define _LINUX_FPROBE_H
#include <linux/compiler.h>
#include <linux/ftrace.h>
#include <linux/rethook.h>
struct fprobe;
fprobe_entry_cb;
fprobe_exit_cb;
struct fprobe { … };
#define FPROBE_FL_DISABLED …
#define FPROBE_FL_KPROBE_SHARED …
static inline bool fprobe_disabled(struct fprobe *fp)
{ … }
static inline bool fprobe_shared_with_kprobes(struct fprobe *fp)
{ … }
#ifdef CONFIG_FPROBE
int register_fprobe(struct fprobe *fp, const char *filter, const char *notfilter);
int register_fprobe_ips(struct fprobe *fp, unsigned long *addrs, int num);
int register_fprobe_syms(struct fprobe *fp, const char **syms, int num);
int unregister_fprobe(struct fprobe *fp);
bool fprobe_is_registered(struct fprobe *fp);
#else
static inline int register_fprobe(struct fprobe *fp, const char *filter, const char *notfilter)
{
return -EOPNOTSUPP;
}
static inline int register_fprobe_ips(struct fprobe *fp, unsigned long *addrs, int num)
{
return -EOPNOTSUPP;
}
static inline int register_fprobe_syms(struct fprobe *fp, const char **syms, int num)
{
return -EOPNOTSUPP;
}
static inline int unregister_fprobe(struct fprobe *fp)
{
return -EOPNOTSUPP;
}
static inline bool fprobe_is_registered(struct fprobe *fp)
{
return false;
}
#endif
static inline void disable_fprobe(struct fprobe *fp)
{ … }
static inline void enable_fprobe(struct fprobe *fp)
{ … }
#endif