lkml.org 
[lkml]   [2020]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [for-linus][PATCH 2/5] tracing/uprobe: Fix double perf_event linking on multiprobe uprobe
On Tue, Jan 21, 2020 at 02:59:35PM +0000, David Laight wrote:
> From: Peter Zijlstra
> > Sent: 21 January 2020 14:50
> > On Tue, Jan 21, 2020 at 09:38:49AM -0500, Steven Rostedt wrote:
> > > diff --git a/kernel/trace/trace_probe.h b/kernel/trace/trace_probe.h
> > > index 4ee703728aec..03e4e180058d 100644
> > > --- a/kernel/trace/trace_probe.h
> > > +++ b/kernel/trace/trace_probe.h
> > > @@ -230,6 +230,7 @@ struct trace_probe_event {
> > > struct trace_event_call call;
> > > struct list_head files;
> > > struct list_head probes;
> > > + char data[0];
> > > };
> >
> > Note that this relies on pure 'luck'. If you stick anything <4 bytes in
> > between the list_head and the data member it'll come unstuck real fast.
>
> Can you fix it by adding an unnamed struct as in:

The trivial fix is like I suggested in the other thread:

struct trace_uprobe_filter filters[0];

The alternative that Masami-San suggested should also work.

\
 
 \ /
  Last update: 2020-01-21 16:06    [W:0.287 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site