Merge tag 'trace-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing updates from Steven Rostedt: "The main changes in this release include: - Add user space specific memory reading for kprobes - Allow kprobes to be executed earlier in boot The rest are mostly just various clean ups and small fixes" * tag 'trace-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (33 commits) tracing: Make trace_get_fields() global tracing: Let filter_assign_type() detect FILTER_PTR_STRING tracing: Pass type into tracing_generic_entry_update() ftrace/selftest: Test if set_event/ftrace_pid exists before writing ftrace/selftests: Return the skip code when tracing directory not configured in kernel tracing/kprobe: Check registered state using kprobe tracing/probe: Add trace_event_call accesses APIs tracing/probe: Add probe event name and group name accesses APIs tracing/probe: Add trace flag access APIs for trace_probe tracing/probe: Add trace_event_file access APIs for trace_probe tracing/probe: Add trace_event_call register API for trace_probe tracing/probe: Add trace_probe init and free functions tracing/uprobe: Set print format when parsing command tracing/kprobe: Set print format right after parsed command kprobes: Fix to init kprobes in subsys_initcall tracepoint: Use struct_size() in kmalloc() ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS ftrace: Enable trampoline when rec count returns back to one tracing/kprobe: Do not run kprobe boot tests if kprobe_event is on cmdline tracing: Make a separate config for trace event self tests ...
This commit is contained in:
@@ -427,8 +427,8 @@ struct dyn_ftrace *ftrace_rec_iter_record(struct ftrace_rec_iter *iter);
|
||||
iter = ftrace_rec_iter_next(iter))
|
||||
|
||||
|
||||
int ftrace_update_record(struct dyn_ftrace *rec, int enable);
|
||||
int ftrace_test_record(struct dyn_ftrace *rec, int enable);
|
||||
int ftrace_update_record(struct dyn_ftrace *rec, bool enable);
|
||||
int ftrace_test_record(struct dyn_ftrace *rec, bool enable);
|
||||
void ftrace_run_stop_machine(int command);
|
||||
unsigned long ftrace_location(unsigned long ip);
|
||||
unsigned long ftrace_location_range(unsigned long start, unsigned long end);
|
||||
|
@@ -142,6 +142,7 @@ enum print_line_t {
|
||||
enum print_line_t trace_handle_return(struct trace_seq *s);
|
||||
|
||||
void tracing_generic_entry_update(struct trace_entry *entry,
|
||||
unsigned short type,
|
||||
unsigned long flags,
|
||||
int pc);
|
||||
struct trace_event_file;
|
||||
@@ -317,6 +318,14 @@ trace_event_name(struct trace_event_call *call)
|
||||
return call->name;
|
||||
}
|
||||
|
||||
static inline struct list_head *
|
||||
trace_get_fields(struct trace_event_call *event_call)
|
||||
{
|
||||
if (!event_call->class->get_fields)
|
||||
return &event_call->class->fields;
|
||||
return event_call->class->get_fields(event_call);
|
||||
}
|
||||
|
||||
struct trace_array;
|
||||
struct trace_subsystem_dir;
|
||||
|
||||
|
@@ -203,7 +203,10 @@ static inline void pagefault_enable(void)
|
||||
/*
|
||||
* Is the pagefault handler disabled? If so, user access methods will not sleep.
|
||||
*/
|
||||
#define pagefault_disabled() (current->pagefault_disabled != 0)
|
||||
static inline bool pagefault_disabled(void)
|
||||
{
|
||||
return current->pagefault_disabled != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* The pagefault handler is in general disabled by pagefault_disable() or
|
||||
@@ -239,6 +242,18 @@ static inline unsigned long __copy_from_user_inatomic_nocache(void *to,
|
||||
extern long probe_kernel_read(void *dst, const void *src, size_t size);
|
||||
extern long __probe_kernel_read(void *dst, const void *src, size_t size);
|
||||
|
||||
/*
|
||||
* probe_user_read(): safely attempt to read from a location in user space
|
||||
* @dst: pointer to the buffer that shall take the data
|
||||
* @src: address to read from
|
||||
* @size: size of the data chunk
|
||||
*
|
||||
* Safely read from address @src to the buffer at @dst. If a kernel fault
|
||||
* happens, handle that and return -EFAULT.
|
||||
*/
|
||||
extern long probe_user_read(void *dst, const void __user *src, size_t size);
|
||||
extern long __probe_user_read(void *dst, const void __user *src, size_t size);
|
||||
|
||||
/*
|
||||
* probe_kernel_write(): safely attempt to write to a location
|
||||
* @dst: address to write to
|
||||
@@ -252,6 +267,9 @@ extern long notrace probe_kernel_write(void *dst, const void *src, size_t size);
|
||||
extern long notrace __probe_kernel_write(void *dst, const void *src, size_t size);
|
||||
|
||||
extern long strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count);
|
||||
extern long strncpy_from_unsafe_user(char *dst, const void __user *unsafe_addr,
|
||||
long count);
|
||||
extern long strnlen_unsafe_user(const void __user *unsafe_addr, long count);
|
||||
|
||||
/**
|
||||
* probe_kernel_address(): safely attempt to read from a location
|
||||
|
Reference in New Issue
Block a user