From: Steven Rostedt <rostedt@goodmis.org> To: Juergen Gross <jgross@suse.com> Cc: LKML <linux-kernel@vger.kernel.org>, Linus Torvalds <torvalds@linux-foundation.org>, Andrew Morton <akpm@linux-foundation.org>, Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>, Thomas Gleixner <tglx@linutronix.de>, Jingjie Jiang <jingjie.jiang@oracle.com>, Mukesh Rathor <mukesh.rathor@oracle.com>, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>, stable@vger.kernel.org Subject: Re: [PATCH] tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all} Date: Fri, 11 May 2018 09:12:24 -0400 [thread overview] Message-ID: <20180511091224.51ee352f@gandalf.local.home> (raw) In-Reply-To: <54c0a807-87e3-866f-aaa8-de383d567d50@suse.com> On Fri, 11 May 2018 06:14:07 +0200 Juergen Gross <jgross@suse.com> wrote: > Any reason not sending this patch to the Xen maintainers? Nope, I guess I should have run the patch through "get_maintainer.pl". > > I can take it through the Xen tree. :-) Thanks! > > Reviewed-by: Juergen Gross <jgross@suse.com> Note, I'm going to be adding the below patch for 4.18 (or 5.0) which will cause the build to break in case there's any more instances of this. -- Steve >From 8f8125877582345dd68f865f76442dda9204c0c1 Mon Sep 17 00:00:00 2001 From: "Steven Rostedt (VMware)" <rostedt@goodmis.org> Date: Thu, 10 May 2018 12:40:21 -0400 Subject: [PATCH] tracing: Prevent further users of zero size static arrays in trace events A zero size static array has special meaning in the ftrace infrastructure. Trace events are for recording data in the trace buffers that is normally difficult to obtain via probes or function tracing. There is no reason for any trace event to declare a zero size static array. If one does, BUILD_BUG_ON() will trigger and prevent the kernel from compiling. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> --- include/trace/trace_events.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h index bfda803b0a09..4ecdfe2e3580 100644 --- a/include/trace/trace_events.h +++ b/include/trace/trace_events.h @@ -422,6 +422,7 @@ static struct trace_event_functions trace_event_type_funcs_##call = { \ do { \ char *type_str = #type"["__stringify(len)"]"; \ BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ + BUILD_BUG_ON(len <= 0); \ ret = trace_define_field(event_call, type_str, #item, \ offsetof(typeof(field), item), \ sizeof(field.item), \ -- 2.13.6
next prev parent reply other threads:[~2018-05-11 13:12 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-09 18:46 Steven Rostedt 2018-05-10 14:37 ` Steven Rostedt 2018-05-11 4:14 ` Juergen Gross 2018-05-11 13:12 ` Steven Rostedt [this message] 2018-05-14 20:29 ` Steven Rostedt
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180511091224.51ee352f@gandalf.local.home \ --to=rostedt@goodmis.org \ --cc=akpm@linux-foundation.org \ --cc=hpa@zytor.com \ --cc=jgross@suse.com \ --cc=jingjie.jiang@oracle.com \ --cc=konrad.wilk@oracle.com \ --cc=linux-kernel@vger.kernel.org \ --cc=mingo@kernel.org \ --cc=mukesh.rathor@oracle.com \ --cc=stable@vger.kernel.org \ --cc=tglx@linutronix.de \ --cc=torvalds@linux-foundation.org \ --subject='Re: [PATCH] tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all}' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.