Skip to content

Commit e6506eb

Browse files
committed
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 parents 9d38cd0 + 45dd9b0 commit e6506eb

File tree

3 files changed

+2
-22
lines changed

3 files changed

+2
-22
lines changed

arch/x86/xen/mmu.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@ xmaddr_t arbitrary_virt_to_machine(void *vaddr)
4242
}
4343
EXPORT_SYMBOL_GPL(arbitrary_virt_to_machine);
4444

45-
static void xen_flush_tlb_all(void)
45+
static noinline void xen_flush_tlb_all(void)
4646
{
4747
struct mmuext_op *op;
4848
struct multicall_space mcs;
4949

50-
trace_xen_mmu_flush_tlb_all(0);
51-
5250
preempt_disable();
5351

5452
mcs = xen_mc_entry(sizeof(*op));

arch/x86/xen/mmu_pv.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,13 +1310,11 @@ unsigned long xen_read_cr2_direct(void)
13101310
return this_cpu_read(xen_vcpu_info.arch.cr2);
13111311
}
13121312

1313-
static void xen_flush_tlb(void)
1313+
static noinline void xen_flush_tlb(void)
13141314
{
13151315
struct mmuext_op *op;
13161316
struct multicall_space mcs;
13171317

1318-
trace_xen_mmu_flush_tlb(0);
1319-
13201318
preempt_disable();
13211319

13221320
mcs = xen_mc_entry(sizeof(*op));

include/trace/events/xen.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -352,22 +352,6 @@ DECLARE_EVENT_CLASS(xen_mmu_pgd,
352352
DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_pin);
353353
DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_unpin);
354354

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-
371355
TRACE_EVENT(xen_mmu_flush_tlb_one_user,
372356
TP_PROTO(unsigned long addr),
373357
TP_ARGS(addr),

0 commit comments

Comments
 (0)