All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, "Ingo Molnar" <mingo@kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Jiri Olsa" <jolsa@kernel.org>,
	"Naveen N . Rao" <naveen.n.rao@linux.ibm.com>,
	"Anil S Keshavamurthy" <anil.s.keshavamurthy@intel.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Namhyung Kim" <namhyung@kernel.org>,
	"Toke Høiland-Jørgensen" <thoiland@redhat.com>,
	"Jean-Tsung Hsiao" <jhsiao@redhat.com>,
	"Jesper Dangaard Brouer" <brouer@redhat.com>,
	stable@vger.kernel.org,
	"Arnaldo Carvalho de Melo" <acme@kernel.org>,
	"Arnaldo Carvalho de Melo" <acme@redhat.com>,
	"Masami Hiramatsu" <mhiramat@kernel.org>
Subject: Re: [for-linus][PATCH 2/5] tracing/uprobe: Fix double perf_event linking on multiprobe uprobe
Date: Tue, 21 Jan 2020 15:50:09 +0100	[thread overview]
Message-ID: <20200121145009.GR14879@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20200121143956.600928887@goodmis.org>

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.

> +static struct trace_uprobe_filter *
> +trace_uprobe_get_filter(struct trace_uprobe *tu)
> +{
> +	struct trace_probe_event *event = tu->tp.event;
> +
> +	return (struct trace_uprobe_filter *)&event->data[0];
> +}

That is, the above does not consider the alignment requirements of
struct trace_uprobe_filter.

  reply	other threads:[~2020-01-21 14:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21 14:38 [for-linus][PATCH 0/5] tracing: Fixes for 5.5 Steven Rostedt
2020-01-21 14:38 ` [for-linus][PATCH 1/5] tracing: xen: Ordered comparison of function pointers Steven Rostedt
2020-01-21 14:38 ` [for-linus][PATCH 2/5] tracing/uprobe: Fix double perf_event linking on multiprobe uprobe Steven Rostedt
2020-01-21 14:50   ` Peter Zijlstra [this message]
2020-01-21 14:59     ` David Laight
2020-01-21 15:06       ` Peter Zijlstra
2020-01-22 22:12         ` Masami Hiramatsu
2020-01-21 14:38 ` [for-linus][PATCH 3/5] tracing: trigger: Replace unneeded RCU-list traversals Steven Rostedt
     [not found]   ` <20200122022623.20D812465A@mail.kernel.org>
2020-01-22  3:32     ` Masami Hiramatsu
2020-01-21 14:38 ` [for-linus][PATCH 4/5] tracing: Fix histogram code when expression has same var as value Steven Rostedt
2020-01-21 14:38 ` [for-linus][PATCH 5/5] tracing: Do not set trace clock if tracefs lockdown is in effect 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=20200121145009.GR14879@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=brouer@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jhsiao@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=rostedt@goodmis.org \
    --cc=stable@vger.kernel.org \
    --cc=thoiland@redhat.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.