BPF List
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: Hou Tao <houtao1@huawei.com>, Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	<bpf@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: Re: [PATCH 2/3] libbpf: support detecting and attaching of writable tracepoint program
Date: Thu, 16 Sep 2021 16:35:46 -0700	[thread overview]
Message-ID: <e91eeff7-e091-3445-f27f-a30646cc5440@fb.com> (raw)
In-Reply-To: <20210916135511.3787194-3-houtao1@huawei.com>



On 9/16/21 6:55 AM, Hou Tao wrote:
> Program on writable tracepoint is BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE,
> but its attachment is the same as BPF_PROG_TYPE_RAW_TRACEPOINT.
> 
> Signed-off-by: Hou Tao <houtao1@huawei.com>
> ---
>   tools/lib/bpf/libbpf.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> index 88d8825fc6f6..e6a1d552040c 100644
> --- a/tools/lib/bpf/libbpf.c
> +++ b/tools/lib/bpf/libbpf.c
> @@ -7942,6 +7942,10 @@ static const struct bpf_sec_def section_defs[] = {
>   		.attach_fn = attach_raw_tp),
>   	SEC_DEF("raw_tp/", RAW_TRACEPOINT,
>   		.attach_fn = attach_raw_tp),
> +	SEC_DEF("raw_tracepoint_writable/", RAW_TRACEPOINT_WRITABLE,
> +		.attach_fn = attach_raw_tp),
> +	SEC_DEF("raw_tp_writable/", RAW_TRACEPOINT_WRITABLE,
> +		.attach_fn = attach_raw_tp),

Looks like initially ([1]) we don't have C bpf program test case for 
RAW_TRACEPOINT_WRITABLE, so the above sec definition is missing.

  [1] e950e843367d7 selftests: bpf: test writable buffers in raw tps

>   	SEC_DEF("tp_btf/", TRACING,
>   		.expected_attach_type = BPF_TRACE_RAW_TP,
>   		.is_attach_btf = true,
> 

  reply	other threads:[~2021-09-16 23:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 13:55 [PATCH 0/3] add support for writable bare tracepoint Hou Tao
2021-09-16 13:55 ` [PATCH 1/3] bpf: support writable context for " Hou Tao
2021-09-16 23:16   ` Yonghong Song
2021-09-17 13:45     ` Hou Tao
2021-09-17 14:48       ` Yonghong Song
2021-09-16 13:55 ` [PATCH 2/3] libbpf: support detecting and attaching of writable tracepoint program Hou Tao
2021-09-16 23:35   ` Yonghong Song [this message]
2021-09-16 13:55 ` [PATCH 3/3] bpf/selftests: add test for writable bare tracepoint Hou Tao
2021-09-16 23:46   ` Yonghong Song
2021-09-17 14:03     ` Hou Tao
2021-09-16 22:58 ` [PATCH 0/3] add support " Yonghong Song

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=e91eeff7-e091-3445-f27f-a30646cc5440@fb.com \
    --to=yhs@fb.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=houtao1@huawei.com \
    --cc=kafai@fb.com \
    --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