All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/2] bpftool: Using the right format specifiers
@ 2025-03-11 11:28 Jiayuan Chen
  2025-03-11 11:28 ` [PATCH bpf-next v2 1/2] bpftool: Add -Wformat-signedness flag to detect format errors Jiayuan Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jiayuan Chen @ 2025-03-11 11:28 UTC (permalink / raw)
  To: bpf, qmo
  Cc: daniel, linux-kernel, ast, davem, kuba, hawk, john.fastabend,
	andrii, martin.lau, eddyz87, song, yonghong.song, kpsingh, sdf,
	haoluo, jolsa, mrpre, Jiayuan Chen

This patch adds the -Wformat-signedness compiler flag to detect and
prevent format string errors, where signed or unsigned types are
mismatched with format specifiers. Additionally, it fixes some format
string errors that were not fully addressed by the previous patch [1].

[1] https://lore.kernel.org/bpf/20250207123706.727928-1-mrpre@163.com/T/#u

---
v1->v2:
https://lore.kernel.org/bpf/20250310142037.45932-1-jiayuan.chen@linux.dev/ 
---
Jiayuan Chen (2):
  bpftool: Add -Wformat-signedness flag to detect format errors
  bpftool: Using the right format specifiers

 kernel/bpf/disasm.c                |  4 ++--
 tools/bpf/bpftool/Makefile         |  7 ++++++-
 tools/bpf/bpftool/btf.c            | 14 +++++++-------
 tools/bpf/bpftool/btf_dumper.c     |  2 +-
 tools/bpf/bpftool/cgroup.c         |  2 +-
 tools/bpf/bpftool/common.c         |  4 ++--
 tools/bpf/bpftool/jit_disasm.c     |  3 ++-
 tools/bpf/bpftool/map_perf_ring.c  |  6 +++---
 tools/bpf/bpftool/net.c            |  4 ++--
 tools/bpf/bpftool/netlink_dumper.c |  6 +++---
 tools/bpf/bpftool/prog.c           | 12 ++++++------
 tools/bpf/bpftool/tracelog.c       |  2 +-
 tools/bpf/bpftool/xlated_dumper.c  |  6 +++---
 13 files changed, 39 insertions(+), 33 deletions(-)

-- 
2.47.1


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

end of thread, other threads:[~2025-03-17 20:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-11 11:28 [PATCH bpf-next v2 0/2] bpftool: Using the right format specifiers Jiayuan Chen
2025-03-11 11:28 ` [PATCH bpf-next v2 1/2] bpftool: Add -Wformat-signedness flag to detect format errors Jiayuan Chen
2025-03-11 11:28 ` [PATCH bpf-next v2 2/2] bpftool: Using the right format specifiers Jiayuan Chen
2025-03-17 21:00 ` [PATCH bpf-next v2 0/2] " patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.