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

Merge tag 'trace-v4.17-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fix from Steven Rostedt:
"Some of the ftrace internal events use a zero for a data size of a
field event. This is increasingly important for the histogram trigger
work that is being extended.

While auditing trace events, I found that a couple of the xen events
were used as just marking that a function was called, by creating a
static array of size zero. This can play havoc with the tracing
features if these events are used, because a zero size of a static
array is denoted as a special nul terminated dynamic array (this is
what the trace_marker code uses). But since the xen events have no
size, they are not nul terminated, and unexpected results may occur.

As trace events were never intended on being a marker to denote that a
function was hit or not, especially since function tracing and kprobes
can trivially do the same, the best course of action is to simply
remove these events"

* tag 'trace-v4.17-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all}

+2 -22
+1 -3
arch/x86/xen/mmu.c
··· 42 42 } 43 43 EXPORT_SYMBOL_GPL(arbitrary_virt_to_machine); 44 44 45 - static void xen_flush_tlb_all(void) 45 + static noinline void xen_flush_tlb_all(void) 46 46 { 47 47 struct mmuext_op *op; 48 48 struct multicall_space mcs; 49 - 50 - trace_xen_mmu_flush_tlb_all(0); 51 49 52 50 preempt_disable(); 53 51
+1 -3
arch/x86/xen/mmu_pv.c
··· 1310 1310 return this_cpu_read(xen_vcpu_info.arch.cr2); 1311 1311 } 1312 1312 1313 - static void xen_flush_tlb(void) 1313 + static noinline void xen_flush_tlb(void) 1314 1314 { 1315 1315 struct mmuext_op *op; 1316 1316 struct multicall_space mcs; 1317 - 1318 - trace_xen_mmu_flush_tlb(0); 1319 1317 1320 1318 preempt_disable(); 1321 1319
-16
include/trace/events/xen.h
··· 352 352 DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_pin); 353 353 DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_unpin); 354 354 355 - TRACE_EVENT(xen_mmu_flush_tlb_all, 356 - TP_PROTO(int x), 357 - TP_ARGS(x), 358 - TP_STRUCT__entry(__array(char, x, 0)), 359 - TP_fast_assign((void)x), 360 - TP_printk("%s", "") 361 - ); 362 - 363 - TRACE_EVENT(xen_mmu_flush_tlb, 364 - TP_PROTO(int x), 365 - TP_ARGS(x), 366 - TP_STRUCT__entry(__array(char, x, 0)), 367 - TP_fast_assign((void)x), 368 - TP_printk("%s", "") 369 - ); 370 - 371 355 TRACE_EVENT(xen_mmu_flush_tlb_one_user, 372 356 TP_PROTO(unsigned long addr), 373 357 TP_ARGS(addr),