All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: "Arnaldo Carvalho de Melo" <acme@kernel.org>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Jiri Olsa" <jolsa@kernel.org>, "Ingo Molnar" <mingo@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>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing/uprobe: Fix double perf_event linking on multiprobe uprobe
Date: Mon, 20 Jan 2020 13:40:22 +0100	[thread overview]
Message-ID: <20200120124022.GA14897@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <157862073931.1800.3800576241181489174.stgit@devnote2>

On Fri, Jan 10, 2020 at 10:45:39AM +0900, Masami Hiramatsu 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];
>  };

Would it make sense to make the above:

	struct trace_uprobe_filter	filter[0];

instead? That would ensure that alignment is respected. While I think
the current code works by accident.

> @@ -264,6 +263,14 @@ process_fetch_insn(struct fetch_insn *code, struct pt_regs *regs, void *dest,
>  }
>  NOKPROBE_SYMBOL(process_fetch_insn)
>  
> +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];
> +}



  parent reply	other threads:[~2020-01-20 12:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10  1:45 [PATCH] tracing/uprobe: Fix double perf_event linking on multiprobe uprobe Masami Hiramatsu
2020-01-10  1:47 ` Masami Hiramatsu
2020-01-14 17:35 ` Arnaldo Carvalho de Melo
2020-01-14 17:44   ` Steven Rostedt
2020-01-14 17:45     ` Arnaldo Carvalho de Melo
2020-01-14 18:32       ` Steven Rostedt
2020-01-15  1:44         ` Masami Hiramatsu
2020-01-20 12:40 ` Peter Zijlstra [this message]
2020-01-20 15:32   ` Masami Hiramatsu
2020-01-21  7:46   ` [PATCH] tracing/uprobe: Fix to make trace_uprobe_filter alignment safe Masami Hiramatsu
2020-01-21 15:50     ` Steven Rostedt
2020-01-22  3:08       ` Masami Hiramatsu
2020-01-22  3:23         ` [PATCH v2] " Masami Hiramatsu

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=20200120124022.GA14897@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.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=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.