mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
Merge tag 'trace-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull more tracing updates from Steven Rostedt: - Make buffer_percent read/write. The buffer_percent file is how users can state how long to block on the tracing buffer depending on how much is in the buffer. When it hits the "buffer_percent" it will wake the task waiting on the buffer. For some reason it was set to read-only. This was not noticed because testing was done as root without SELinux, but with SELinux it will prevent even root to write to it without having CAP_DAC_OVERRIDE. - The "touched_functions" was added this merge window, but one of the reasons for adding it was not implemented. That was to show what functions were not only touched, but had either a direct trampoline attached to it, or a kprobe or live kernel patching that can "hijack" the function to run a different function. The point is to know if there's functions in the kernel that may not be behaving as the kernel code shows. This can be used for debugging. TODO: Add this information to kernel oops too. * tag 'trace-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: ftrace: Add MODIFIED flag to show if IPMODIFY or direct was attached tracing: Fix permissions for the buffer_percent file
This commit is contained in:
@@ -549,6 +549,7 @@ bool is_ftrace_trampoline(unsigned long addr);
|
||||
* CALL_OPS - the record can use callsite-specific ops
|
||||
* CALL_OPS_EN - the function is set up to use callsite-specific ops
|
||||
* TOUCHED - A callback was added since boot up
|
||||
* MODIFIED - The function had IPMODIFY or DIRECT attached to it
|
||||
*
|
||||
* When a new ftrace_ops is registered and wants a function to save
|
||||
* pt_regs, the rec->flags REGS is set. When the function has been
|
||||
@@ -569,9 +570,10 @@ enum {
|
||||
FTRACE_FL_CALL_OPS = (1UL << 22),
|
||||
FTRACE_FL_CALL_OPS_EN = (1UL << 21),
|
||||
FTRACE_FL_TOUCHED = (1UL << 20),
|
||||
FTRACE_FL_MODIFIED = (1UL << 19),
|
||||
};
|
||||
|
||||
#define FTRACE_REF_MAX_SHIFT 20
|
||||
#define FTRACE_REF_MAX_SHIFT 19
|
||||
#define FTRACE_REF_MAX ((1UL << FTRACE_REF_MAX_SHIFT) - 1)
|
||||
|
||||
#define ftrace_rec_count(rec) ((rec)->flags & FTRACE_REF_MAX)
|
||||
|
||||
Reference in New Issue
Block a user