bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Daniel Xu <dxu@dxuuu.xyz>
Cc: Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
	Andrii Nakryiko <andriin@fb.com>, bpf <bpf@vger.kernel.org>,
	Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH 3/3] tracing/kprobe: Add self test for PERF_EVENT_IOC_QUERY_KPROBE
Date: Wed, 7 Aug 2019 14:49:13 -0700	[thread overview]
Message-ID: <CAEf4Bza1+n+1fUu6gJZqy5YxoyV6UD9BrfkS7e7uuRdJ443EBQ@mail.gmail.com> (raw)
In-Reply-To: <20190806234201.6296-2-dxu@dxuuu.xyz>

On Tue, Aug 6, 2019 at 4:42 PM Daniel Xu <dxu@dxuuu.xyz> wrote:
>
> ---
>  tools/include/uapi/linux/perf_event.h         | 23 ++++++++++
>  .../selftests/bpf/prog_tests/attach_probe.c   | 43 +++++++++++++++++++
>  2 files changed, 66 insertions(+)
>
> diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h
> index 7198ddd0c6b1..4a5e18606baf 100644
> --- a/tools/include/uapi/linux/perf_event.h
> +++ b/tools/include/uapi/linux/perf_event.h

Please split header sync into separate patch, this will cause problems
syncing libbpf to Github.

> @@ -447,6 +447,28 @@ struct perf_event_query_bpf {
>         __u32   ids[0];
>  };
>

[...]

>         ssize_t base_addr;
> +       struct perf_event_query_kprobe kprobe_query;
> +       struct perf_event_query_kprobe kretprobe_query;

Add = {} and avoid using memsets below.

>
>         base_addr = get_base_addr();
>         if (CHECK(base_addr < 0, "get_base_addr",
> @@ -116,6 +119,46 @@ void test_attach_probe(void)
>         /* trigger & validate kprobe && kretprobe */
>         usleep(1);
>

[...]

  parent reply	other threads:[~2019-08-07 21:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-06 23:42 [PATCH 2/3] libbpf: Add helper to extract perf fd from bpf_link Daniel Xu
2019-08-06 23:42 ` [PATCH 3/3] tracing/kprobe: Add self test for PERF_EVENT_IOC_QUERY_KPROBE Daniel Xu
2019-08-07  6:01   ` Yonghong Song
2019-08-07 21:49   ` Andrii Nakryiko [this message]
2019-08-07 18:19 ` [PATCH 2/3] libbpf: Add helper to extract perf fd from bpf_link Song Liu
2019-08-07 18:57 ` Andrii Nakryiko
2019-08-09  1:31   ` Daniel Xu

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=CAEf4Bza1+n+1fUu6gJZqy5YxoyV6UD9BrfkS7e7uuRdJ443EBQ@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=dxu@dxuuu.xyz \
    --cc=kernel-team@fb.com \
    --cc=songliubraving@fb.com \
    --cc=yhs@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;
as well as URLs for NNTP newsgroup(s).