BPF Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v4 bpf-next] Add CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES check to bpftool feature command
@ 2021-02-22 19:58 grantseltzer
  2021-02-22 22:00 ` Martin KaFai Lau
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: grantseltzer @ 2021-02-22 19:58 UTC (permalink / raw)
  To: andrii, daniel, kafai, songliubraving, john.fastabend, kpsingh
  Cc: irogers, yhs, tklauser, netdev, mrostecki, ast, quentin, bpf,
	grantseltzer

This adds both the CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES
kernel compile option to output of the bpftool feature command.
This is relevant for developers that want to account for data structure
definition differences between kernels.

Signed-off-by: Grant Seltzer <grantseltzer@gmail.com>
---
 tools/bpf/bpftool/feature.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
index 359960a8f..40a88df27 100644
--- a/tools/bpf/bpftool/feature.c
+++ b/tools/bpf/bpftool/feature.c
@@ -336,6 +336,10 @@ static void probe_kernel_image_config(const char *define_prefix)
 		{ "CONFIG_BPF_JIT", },
 		/* Avoid compiling eBPF interpreter (use JIT only) */
 		{ "CONFIG_BPF_JIT_ALWAYS_ON", },
+		/* Kernel BTF debug information available */
+		{ "CONFIG_DEBUG_INFO_BTF", },
+		/* Kernel module BTF debug information available */
+		{ "CONFIG_DEBUG_INFO_BTF_MODULES", },
 
 		/* cgroups */
 		{ "CONFIG_CGROUPS", },
-- 
2.29.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 bpf-next] Add CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES check to bpftool feature command
  2021-02-22 19:58 [PATCH v4 bpf-next] Add CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES check to bpftool feature command grantseltzer
@ 2021-02-22 22:00 ` Martin KaFai Lau
  2021-02-23  6:37 ` Andrii Nakryiko
  2021-02-23  6:41 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Martin KaFai Lau @ 2021-02-22 22:00 UTC (permalink / raw)
  To: grantseltzer
  Cc: andrii, daniel, songliubraving, john.fastabend, kpsingh, irogers,
	yhs, tklauser, netdev, mrostecki, ast, quentin, bpf

On Mon, Feb 22, 2021 at 07:58:46PM +0000, grantseltzer wrote:
> This adds both the CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES
> kernel compile option to output of the bpftool feature command.
> This is relevant for developers that want to account for data structure
> definition differences between kernels.
Acked-by: Martin KaFai Lau <kafai@fb.com>

[ Acked-by and Reviewed-by can be carried over to
  the following revisions if the change is obvious.

  Also, it is useful to comment on what has
  changed between revisions.  There is no need
  to resend this patch just for this though. ]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 bpf-next] Add CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES check to bpftool feature command
  2021-02-22 19:58 [PATCH v4 bpf-next] Add CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES check to bpftool feature command grantseltzer
  2021-02-22 22:00 ` Martin KaFai Lau
@ 2021-02-23  6:37 ` Andrii Nakryiko
  2021-02-23  6:41 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Andrii Nakryiko @ 2021-02-23  6:37 UTC (permalink / raw)
  To: grantseltzer
  Cc: Andrii Nakryiko, Daniel Borkmann, Martin Lau, Song Liu,
	john fastabend, KP Singh, Ian Rogers, Yonghong Song,
	Tobias Klauser, Networking, Michal Rostecki, Alexei Starovoitov,
	Quentin Monnet, bpf

On Mon, Feb 22, 2021 at 11:59 AM grantseltzer <grantseltzer@gmail.com> wrote:
>
> This adds both the CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES
> kernel compile option to output of the bpftool feature command.
> This is relevant for developers that want to account for data structure
> definition differences between kernels.
>
> Signed-off-by: Grant Seltzer <grantseltzer@gmail.com>
> ---

Applied to bpf-next, but adjusted subject to shorter:

"Add kernel/modules BTF presence checks to bpftool feature command"

>  tools/bpf/bpftool/feature.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
> index 359960a8f..40a88df27 100644
> --- a/tools/bpf/bpftool/feature.c
> +++ b/tools/bpf/bpftool/feature.c
> @@ -336,6 +336,10 @@ static void probe_kernel_image_config(const char *define_prefix)
>                 { "CONFIG_BPF_JIT", },
>                 /* Avoid compiling eBPF interpreter (use JIT only) */
>                 { "CONFIG_BPF_JIT_ALWAYS_ON", },
> +               /* Kernel BTF debug information available */
> +               { "CONFIG_DEBUG_INFO_BTF", },
> +               /* Kernel module BTF debug information available */
> +               { "CONFIG_DEBUG_INFO_BTF_MODULES", },
>
>                 /* cgroups */
>                 { "CONFIG_CGROUPS", },
> --
> 2.29.2
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 bpf-next] Add CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES check to bpftool feature command
  2021-02-22 19:58 [PATCH v4 bpf-next] Add CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES check to bpftool feature command grantseltzer
  2021-02-22 22:00 ` Martin KaFai Lau
  2021-02-23  6:37 ` Andrii Nakryiko
@ 2021-02-23  6:41 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-23  6:41 UTC (permalink / raw)
  To: Grant Seltzer Richman
  Cc: andrii, daniel, kafai, songliubraving, john.fastabend, kpsingh,
	irogers, yhs, tklauser, netdev, mrostecki, ast, quentin, bpf

Hello:

This patch was applied to bpf/bpf-next.git (refs/heads/master):

On Mon, 22 Feb 2021 19:58:46 +0000 you wrote:
> This adds both the CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES
> kernel compile option to output of the bpftool feature command.
> This is relevant for developers that want to account for data structure
> definition differences between kernels.
> 
> Signed-off-by: Grant Seltzer <grantseltzer@gmail.com>
> 
> [...]

Here is the summary with links:
  - [v4,bpf-next] Add CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES check to bpftool feature command
    https://git.kernel.org/bpf/bpf-next/c/6b12bb20aeb3

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22 19:58 [PATCH v4 bpf-next] Add CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES check to bpftool feature command grantseltzer
2021-02-22 22:00 ` Martin KaFai Lau
2021-02-23  6:37 ` Andrii Nakryiko
2021-02-23  6:41 ` patchwork-bot+netdevbpf

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
		bpf@vger.kernel.org
	public-inbox-index bpf

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.bpf


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git