summaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace.h
diff options
context:
space:
mode:
authorJoel Fernandes <joelaf@google.com>2016-11-15 15:31:20 -0500
committerKees Cook <keescook@chromium.org>2016-11-15 19:34:30 -0500
commitd032ae8921ea792c1e6b2abb44022b2403f651f6 (patch)
tree43e227118b9111e27a0df4f199e6632d552311dc /include/linux/ftrace.h
parenta5d23b956cabd5931d4aff07573cd9d053bacd74 (diff)
ftrace: Provide API to use global filtering for ftrace ops
Currently the global_ops filtering hash is not available to outside users registering for function tracing. Provide an API for those users to be able to choose global filtering. This is in preparation for pstore's ftrace feature to be able to use the global filters. Suggested-by: Steven Rostedt <rostedt@goodmis.org> Cc: Anton Vorontsov <anton@enomsg.org> Cc: Colin Cross <ccross@android.com> Cc: Kees Cook <keescook@chromium.org> Cc: Tony Luck <tony.luck@intel.com> Signed-off-by: Joel Fernandes <joelaf@google.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r--include/linux/ftrace.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index b3d34d3e0e7e..d4a884db16a3 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -398,6 +398,7 @@ int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf,
398void ftrace_set_global_filter(unsigned char *buf, int len, int reset); 398void ftrace_set_global_filter(unsigned char *buf, int len, int reset);
399void ftrace_set_global_notrace(unsigned char *buf, int len, int reset); 399void ftrace_set_global_notrace(unsigned char *buf, int len, int reset);
400void ftrace_free_filter(struct ftrace_ops *ops); 400void ftrace_free_filter(struct ftrace_ops *ops);
401void ftrace_ops_set_global_filter(struct ftrace_ops *ops);
401 402
402int register_ftrace_command(struct ftrace_func_command *cmd); 403int register_ftrace_command(struct ftrace_func_command *cmd);
403int unregister_ftrace_command(struct ftrace_func_command *cmd); 404int unregister_ftrace_command(struct ftrace_func_command *cmd);
@@ -645,6 +646,7 @@ static inline unsigned long ftrace_location(unsigned long ip)
645#define ftrace_set_filter(ops, buf, len, reset) ({ -ENODEV; }) 646#define ftrace_set_filter(ops, buf, len, reset) ({ -ENODEV; })
646#define ftrace_set_notrace(ops, buf, len, reset) ({ -ENODEV; }) 647#define ftrace_set_notrace(ops, buf, len, reset) ({ -ENODEV; })
647#define ftrace_free_filter(ops) do { } while (0) 648#define ftrace_free_filter(ops) do { } while (0)
649#define ftrace_ops_set_global_filter(ops) do { } while (0)
648 650
649static inline ssize_t ftrace_filter_write(struct file *file, const char __user *ubuf, 651static inline ssize_t ftrace_filter_write(struct file *file, const char __user *ubuf,
650 size_t cnt, loff_t *ppos) { return -ENODEV; } 652 size_t cnt, loff_t *ppos) { return -ENODEV; }