public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v4 1/2] bpftool: Add HELP_SPEC_OPTIONS in token.c
@ 2025-09-19  3:48 Tao Chen
  2025-09-19  3:48 ` [PATCH bpf-next v4 2/2] bpftool: Fix UAF in get_delegate_value Tao Chen
  2025-09-19 22:40 ` [PATCH bpf-next v4 1/2] bpftool: Add HELP_SPEC_OPTIONS in token.c patchwork-bot+netdevbpf
  0 siblings, 2 replies; 5+ messages in thread
From: Tao Chen @ 2025-09-19  3:48 UTC (permalink / raw)
  To: qmo, ast, daniel, andrii, martin.lau, eddyz87, song,
	yonghong.song, john.fastabend, kpsingh, sdf, haoluo, jolsa,
	chen.dylane
  Cc: bpf, linux-kernel

$ ./bpftool token help

Usage: bpftool token { show | list }
       bpftool token help
       OPTIONS := { {-j|--json} [{-p|--pretty}] | {-d|--debug} }

Fixes: 2d812311c2b2 ("bpftool: Add bpf_token show")

Acked-by: Quentin Monnet <qmo@kernel.org>
Signed-off-by: Tao Chen <chen.dylane@linux.dev>
---
 tools/bpf/bpftool/token.c | 1 +
 1 file changed, 1 insertion(+)

Change list:
 v1 -> v2:
  - strdup(mntent->mnt_opts) once per cmd/map/prog and
    remove another strdrup/free in print_items_per_line
    in patch2.(Alexei)
  v1: https://lore.kernel.org/bpf/20250916054111.1151487-1-chen.dylane@linux.dev
 v2 -> v3:
  - Replace PRINT_DELEGATE_OPT* macros with functions.(Quentin)
  v2: https://lore.kernel.org/bpf/20250917034732.1185429-2-chen.dylane@linux.dev
 v3 -> v4:
  - move the declaration of variable "i" to the top of
    the function.(Quentin)
  - move the declaration of "opts" and "value" inside of
    the for loop.(Quentin)
  v3: https://lore.kernel.org/bpf/20250918120908.1255263-1-chen.dylane@linux.dev

diff --git a/tools/bpf/bpftool/token.c b/tools/bpf/bpftool/token.c
index 6312e662a12..82b829e44c8 100644
--- a/tools/bpf/bpftool/token.c
+++ b/tools/bpf/bpftool/token.c
@@ -206,6 +206,7 @@ static int do_help(int argc, char **argv)
 	fprintf(stderr,
 		"Usage: %1$s %2$s { show | list }\n"
 		"       %1$s %2$s help\n"
+		"       " HELP_SPEC_OPTIONS " }\n"
 		"\n"
 		"",
 		bin_name, argv[-2]);
-- 
2.48.1


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

end of thread, other threads:[~2025-09-19 22:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-19  3:48 [PATCH bpf-next v4 1/2] bpftool: Add HELP_SPEC_OPTIONS in token.c Tao Chen
2025-09-19  3:48 ` [PATCH bpf-next v4 2/2] bpftool: Fix UAF in get_delegate_value Tao Chen
2025-09-19  8:56   ` Quentin Monnet
2025-09-19 22:37   ` Andrii Nakryiko
2025-09-19 22:40 ` [PATCH bpf-next v4 1/2] bpftool: Add HELP_SPEC_OPTIONS in token.c patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox