mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Song Liu <songliubraving@fb.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	ast@kernel.org, daniel@iogearbox.net, kernel-team@fb.com,
	acme@kernel.org
Subject: Re: [PATCH v3 perf, bpf-next 1/4] perf, bpf: Introduce PERF_RECORD_BPF_EVENT
Date: Wed, 12 Dec 2018 13:06:32 +0100	[thread overview]
Message-ID: <20181212120632.GY5289@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20181211233351.4036381-2-songliubraving@fb.com>

On Tue, Dec 11, 2018 at 03:33:47PM -0800, Song Liu wrote:
> +static void perf_event_bpf_output(struct perf_event *event,
> +				   void *data)
> +{
> +	struct perf_bpf_event *bpf_event = data;
> +	struct perf_output_handle handle;
> +	struct perf_sample_data sample;
> +	char name[KSYM_NAME_LEN];
> +	int name_len;
> +	int ret;
> +
> +	if (!perf_event_bpf_match(event))
> +		return;
> +
> +	/* get prog name and round up to 64 bit aligned */
> +	bpf_get_prog_name(bpf_event->prog, name);
> +	name_len = strlen(name) + 1;
> +	while (!IS_ALIGNED(name_len, sizeof(u64)))
> +		name[name_len++] = '\0';

Does this not require something like:

	BUILD_BUG_ON(KSYM_NAME_LEN % sizeof(u64));

  reply	other threads:[~2018-12-12 12:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 23:33 [PATCH v3 perf, bpf-next 0/4] reveal invisible bpf programs Song Liu
2018-12-11 23:33 ` [PATCH v3 perf, bpf-next 1/4] perf, bpf: Introduce PERF_RECORD_BPF_EVENT Song Liu
2018-12-12 12:06   ` Peter Zijlstra [this message]
2018-12-12 16:49     ` Song Liu
2018-12-12 13:15   ` Peter Zijlstra
2018-12-12 13:27     ` Arnaldo Carvalho de Melo
2018-12-12 17:33       ` Song Liu
2018-12-12 17:09     ` Song Liu
2018-12-12 18:05       ` Peter Zijlstra
2018-12-12 18:33         ` Steven Rostedt
2018-12-12 18:58           ` Song Liu
2018-12-13 18:45           ` Peter Zijlstra
2018-12-13 21:48             ` Song Liu
2018-12-14 13:48               ` Arnaldo Carvalho de Melo
2018-12-14 17:10                 ` Song Liu
2018-12-17 15:48                 ` Peter Zijlstra
2018-12-12 18:56         ` Song Liu
2018-12-13 15:25           ` Peter Zijlstra
2018-12-13 16:07             ` Song Liu
2018-12-11 23:33 ` [PATCH v3 perf, bpf-next 2/4] perf: sync tools/include/uapi/linux/perf_event.h Song Liu
2018-12-11 23:33 ` [PATCH v3 perf, bpf-next 3/4] perf util: handle PERF_RECORD_BPF_EVENT Song Liu
2018-12-11 23:33 ` [PATCH v3 perf, bpf-next 4/4] perf tools: synthesize bpf event for loaded BPF programs Song Liu

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=20181212120632.GY5289@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome