Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'trace-v5.13-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fixes from Steven Rostedt:

- Fix the length check in the temp buffer filter

- Fix build failure in bootconfig tools for "fallthrough" macro

- Fix error return of bootconfig apply_xbc() routine

* tag 'trace-v5.13-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing: Correct the length check which causes memory corruption
ftrace: Do not blindly read the ip address in ftrace_bug()
tools/bootconfig: Fix a build error accroding to undefined fallthrough
tools/bootconfig: Fix error return code in apply_xbc()

+13 -2
+7 -1
kernel/trace/ftrace.c
··· 1967 1967 1968 1968 static void print_ip_ins(const char *fmt, const unsigned char *p) 1969 1969 { 1970 + char ins[MCOUNT_INSN_SIZE]; 1970 1971 int i; 1972 + 1973 + if (copy_from_kernel_nofault(ins, p, MCOUNT_INSN_SIZE)) { 1974 + printk(KERN_CONT "%s[FAULT] %px\n", fmt, p); 1975 + return; 1976 + } 1971 1977 1972 1978 printk(KERN_CONT "%s", fmt); 1973 1979 1974 1980 for (i = 0; i < MCOUNT_INSN_SIZE; i++) 1975 - printk(KERN_CONT "%s%02x", i ? ":" : "", p[i]); 1981 + printk(KERN_CONT "%s%02x", i ? ":" : "", ins[i]); 1976 1982 } 1977 1983 1978 1984 enum ftrace_bug_type ftrace_bug_type;
+1 -1
kernel/trace/trace.c
··· 2736 2736 (entry = this_cpu_read(trace_buffered_event))) { 2737 2737 /* Try to use the per cpu buffer first */ 2738 2738 val = this_cpu_inc_return(trace_buffered_event_cnt); 2739 - if ((len < (PAGE_SIZE - sizeof(*entry))) && val == 1) { 2739 + if ((len < (PAGE_SIZE - sizeof(*entry) - sizeof(entry->array[0]))) && val == 1) { 2740 2740 trace_event_setup(entry, type, trace_ctx); 2741 2741 entry->array[0] = len; 2742 2742 return entry;
+4
tools/bootconfig/include/linux/bootconfig.h
··· 4 4 5 5 #include "../../../../include/linux/bootconfig.h" 6 6 7 + #ifndef fallthrough 8 + # define fallthrough 9 + #endif 10 + 7 11 #endif
+1
tools/bootconfig/main.c
··· 399 399 } 400 400 /* TODO: Ensure the @path is initramfs/initrd image */ 401 401 if (fstat(fd, &stat) < 0) { 402 + ret = -errno; 402 403 pr_err("Failed to get the size of %s\n", path); 403 404 goto out; 404 405 }