AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/06/26 10:56 flow patch-triage
0m Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch only modifies format specifiers in logging functions (pr_warn, pr_debug) and one sscanf call in user-space libbpf code (tools/lib/bpf/). It does not make any functional changes to the kernel execution flow.",
  "WorthFuzzing": false
}

1/1 2026/06/26 10:56 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit a3aaa519c212a87d8d4df2e49c53678ac69d9cb6\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Fri Jun 26 10:56:14 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c\nindex 823bce895178da..bf6a6811840513 100644\n--- a/tools/lib/bpf/btf.c\n+++ b/tools/lib/bpf/btf.c\n@@ -589,7 +589,7 @@ static int btf_parse_type_sec(struct btf *btf)\n \t\tif (type_size \u003c 0)\n \t\t\treturn type_size;\n \t\tif (next_type + type_size \u003e end_type) {\n-\t\t\tpr_warn(\"BTF type [%d] is malformed\\n\", btf-\u003estart_id + btf-\u003enr_types);\n+\t\t\tpr_warn(\"BTF type [%u] is malformed\\n\", btf-\u003estart_id + btf-\u003enr_types);\n \t\t\treturn -EINVAL;\n \t\t}\n \n@@ -1424,7 +1424,7 @@ static int btf_find_elf_sections(Elf *elf, const char *path, struct btf_elf_secs\n \t\t\tcontinue;\n \n \t\tif (sh.sh_type != SHT_PROGBITS) {\n-\t\t\tpr_warn(\"unexpected section type (%d) of section(%d, %s) from %s\\n\",\n+\t\t\tpr_warn(\"unexpected section type (%u) of section(%d, %s) from %s\\n\",\n \t\t\t\tsh.sh_type, idx, name, path);\n \t\t\tgoto err;\n \t\t}\n@@ -4854,7 +4854,7 @@ static bool btf_dedup_identical_types(struct btf_dedup *d, __u32 id1, __u32 id2,\n \t\t\t\tcontinue;\n \t\t\tif (!btf_dedup_identical_types(d, m1-\u003etype, m2-\u003etype, depth - 1)) {\n \t\t\t\tif (t1-\u003ename_off) {\n-\t\t\t\t\tpr_debug(\"%s '%s' size=%d vlen=%d id1[%u] id2[%u] shallow-equal but not identical for field#%d '%s'\\n\",\n+\t\t\t\t\tpr_debug(\"%s '%s' size=%u vlen=%u id1[%u] id2[%u] shallow-equal but not identical for field#%d '%s'\\n\",\n \t\t\t\t\t\t k1 == BTF_KIND_STRUCT ? \"STRUCT\" : \"UNION\",\n \t\t\t\t\t\t btf__name_by_offset(d-\u003ebtf, t1-\u003ename_off),\n \t\t\t\t\t\t t1-\u003esize, btf_vlen(t1), id1, id2, i,\n@@ -5104,7 +5104,7 @@ static int btf_dedup_is_equiv(struct btf_dedup *d, __u32 cand_id,\n \t\t\teq = btf_dedup_is_equiv(d, cand_m-\u003etype, canon_m-\u003etype);\n \t\t\tif (eq \u003c= 0) {\n \t\t\t\tif (cand_type-\u003ename_off) {\n-\t\t\t\t\tpr_debug(\"%s '%s' size=%d vlen=%d cand_id[%u] canon_id[%u] shallow-equal but not equiv for field#%d '%s': %d\\n\",\n+\t\t\t\t\tpr_debug(\"%s '%s' size=%u vlen=%u cand_id[%u] canon_id[%u] shallow-equal but not equiv for field#%d '%s': %d\\n\",\n \t\t\t\t\t\t cand_kind == BTF_KIND_STRUCT ? \"STRUCT\" : \"UNION\",\n \t\t\t\t\t\t btf__name_by_offset(d-\u003ebtf, cand_type-\u003ename_off),\n \t\t\t\t\t\t cand_type-\u003esize, vlen, cand_id, canon_id, i,\n@@ -6069,7 +6069,7 @@ static int btf_add_distilled_types(struct btf_distill *dist)\n \t\t\terr = btf_add_type(\u0026dist-\u003epipe, t);\n \t\t\tbreak;\n \t\tdefault:\n-\t\t\tpr_warn(\"unexpected kind when adding base type '%s'[%u] of kind [%u] to distilled base BTF.\\n\",\n+\t\t\tpr_warn(\"unexpected kind when adding base type '%s'[%d] of kind [%d] to distilled base BTF.\\n\",\n \t\t\t\tname, i, kind);\n \t\t\treturn -EINVAL;\n \ndiff --git a/tools/lib/bpf/btf_dump.c b/tools/lib/bpf/btf_dump.c\nindex cc1ba65bb6c5ac..123c448f20c746 100644\n--- a/tools/lib/bpf/btf_dump.c\n+++ b/tools/lib/bpf/btf_dump.c\n@@ -1776,7 +1776,7 @@ static int btf_dump_get_bitfield_value(struct btf_dump *d,\n \n \t/* Maximum supported bitfield size is 64 bits */\n \tif (t-\u003esize \u003e 8) {\n-\t\tpr_warn(\"unexpected bitfield size %d\\n\", t-\u003esize);\n+\t\tpr_warn(\"unexpected bitfield size %u\\n\", t-\u003esize);\n \t\treturn -EINVAL;\n \t}\n \n@@ -2251,7 +2251,7 @@ static int btf_dump_get_enum_value(struct btf_dump *d,\n \t\t*value = is_signed ? *(__s8 *)data : *(__u8 *)data;\n \t\treturn 0;\n \tdefault:\n-\t\tpr_warn(\"unexpected size %d for enum, id:[%u]\\n\", t-\u003esize, id);\n+\t\tpr_warn(\"unexpected size %u for enum, id:[%u]\\n\", t-\u003esize, id);\n \t\treturn -EINVAL;\n \t}\n }\ndiff --git a/tools/lib/bpf/btf_relocate.c b/tools/lib/bpf/btf_relocate.c\nindex 53d1f3541bce69..df5fa4bd87d69a 100644\n--- a/tools/lib/bpf/btf_relocate.c\n+++ b/tools/lib/bpf/btf_relocate.c\n@@ -280,7 +280,7 @@ static int btf_relocate_map_distilled_base(struct btf_relocate *r)\n \t\t     cmp_btf_name_size(\u0026base_info, dist_info) == 0;\n \t\t     dist_info++) {\n \t\t\tif (!dist_info-\u003eid || dist_info-\u003eid \u003e= r-\u003enr_dist_base_types) {\n-\t\t\t\tpr_warn(\"base BTF id [%d] maps to invalid distilled base BTF id [%d]\\n\",\n+\t\t\t\tpr_warn(\"base BTF id [%u] maps to invalid distilled base BTF id [%u]\\n\",\n \t\t\t\t\tid, dist_info-\u003eid);\n \t\t\t\terr = -EINVAL;\n \t\t\t\tgoto done;\n@@ -368,7 +368,7 @@ static int btf_relocate_map_distilled_base(struct btf_relocate *r)\n \t\t\tcontinue;\n \t\tdist_t = btf_type_by_id(r-\u003edist_base_btf, id);\n \t\tname = btf__name_by_offset(r-\u003edist_base_btf, dist_t-\u003ename_off);\n-\t\tpr_warn(\"distilled base BTF type '%s' [%d] is not mapped to base BTF id\\n\",\n+\t\tpr_warn(\"distilled base BTF type '%s' [%u] is not mapped to base BTF id\\n\",\n \t\t\tname, id);\n \t\terr = -EINVAL;\n \t\tbreak;\n@@ -397,11 +397,11 @@ static int btf_relocate_validate_distilled_base(struct btf_relocate *r)\n \t\tcase BTF_KIND_FWD:\n \t\t\tif (t-\u003ename_off)\n \t\t\t\tbreak;\n-\t\t\tpr_warn(\"type [%d], kind [%d] is invalid for distilled base BTF; it is anonymous\\n\",\n+\t\t\tpr_warn(\"type [%u], kind [%d] is invalid for distilled base BTF; it is anonymous\\n\",\n \t\t\t\ti, kind);\n \t\t\treturn -EINVAL;\n \t\tdefault:\n-\t\t\tpr_warn(\"type [%d] in distilled based BTF has unexpected kind [%d]\\n\",\n+\t\t\tpr_warn(\"type [%u] in distilled based BTF has unexpected kind [%d]\\n\",\n \t\t\t\ti, kind);\n \t\t\treturn -EINVAL;\n \t\t}\ndiff --git a/tools/lib/bpf/elf.c b/tools/lib/bpf/elf.c\nindex 295dbda2458071..fe136d0259679f 100644\n--- a/tools/lib/bpf/elf.c\n+++ b/tools/lib/bpf/elf.c\n@@ -354,7 +354,7 @@ long elf_find_func_offset(Elf *elf, const char *binary_path, const char *name)\n \n \tif (ret \u003e 0) {\n \t\tpr_debug(\"elf: symbol address match for '%s' in '%s': 0x%lx\\n\", name, binary_path,\n-\t\t\t ret);\n+\t\t\t (unsigned long)ret);\n \t} else {\n \t\tif (ret == 0) {\n \t\t\tpr_warn(\"elf: '%s' is 0 in symtab for '%s': %s\\n\", name, binary_path,\ndiff --git a/tools/lib/bpf/gen_loader.c b/tools/lib/bpf/gen_loader.c\nindex d79695f01c87f3..c7f2d2ac7bb35f 100644\n--- a/tools/lib/bpf/gen_loader.c\n+++ b/tools/lib/bpf/gen_loader.c\n@@ -384,7 +384,7 @@ int bpf_gen__finish(struct bpf_gen *gen, int nr_progs, int nr_maps)\n \tint i;\n \n \tif (nr_progs \u003c gen-\u003enr_progs || nr_maps != gen-\u003enr_maps) {\n-\t\tpr_warn(\"nr_progs %d/%d nr_maps %d/%d mismatch\\n\",\n+\t\tpr_warn(\"nr_progs %d/%u nr_maps %d/%u mismatch\\n\",\n \t\t\tnr_progs, gen-\u003enr_progs, nr_maps, gen-\u003enr_maps);\n \t\tgen-\u003eerror = -EFAULT;\n \t\treturn gen-\u003eerror;\n@@ -488,7 +488,7 @@ void bpf_gen__load_btf(struct bpf_gen *gen, const void *btf_raw_data,\n \n \tattr.btf_size = tgt_endian(btf_raw_size);\n \tbtf_load_attr = add_data(gen, \u0026attr, attr_size);\n-\tpr_debug(\"gen: load_btf: off %d size %d, attr: off %d size %d\\n\",\n+\tpr_debug(\"gen: load_btf: off %d size %u, attr: off %d size %d\\n\",\n \t\t btf_data, btf_raw_size, btf_load_attr, attr_size);\n \n \t/* populate union bpf_attr with user provided log details */\n@@ -534,7 +534,7 @@ void bpf_gen__map_create(struct bpf_gen *gen,\n \tattr.btf_value_type_id = tgt_endian(map_attr-\u003ebtf_value_type_id);\n \n \tmap_create_attr = add_data(gen, \u0026attr, attr_size);\n-\tpr_debug(\"gen: map_create: %s idx %d type %d value_type_id %d, attr: off %d size %d\\n\",\n+\tpr_debug(\"gen: map_create: %s idx %d type %u value_type_id %u, attr: off %d size %d\\n\",\n \t\t map_name, map_idx, map_type, map_attr-\u003ebtf_value_type_id,\n \t\t map_create_attr, attr_size);\n \n@@ -1082,7 +1082,7 @@ void bpf_gen__prog_load(struct bpf_gen *gen,\n \tlicense_off = add_data(gen, license, strlen(license) + 1);\n \t/* add insns to blob of bytes */\n \tinsns_off = add_data(gen, insns, insn_cnt * sizeof(struct bpf_insn));\n-\tpr_debug(\"gen: prog_load: prog_idx %d type %d insn off %d insns_cnt %zd license off %d\\n\",\n+\tpr_debug(\"gen: prog_load: prog_idx %d type %u insn off %d insns_cnt %zu license off %d\\n\",\n \t\t prog_idx, prog_type, insns_off, insn_cnt, license_off);\n \n \t/* convert blob insns to target endianness */\n@@ -1105,21 +1105,21 @@ void bpf_gen__prog_load(struct bpf_gen *gen,\n \tattr.func_info_rec_size = tgt_endian(load_attr-\u003efunc_info_rec_size);\n \tattr.func_info_cnt = tgt_endian(load_attr-\u003efunc_info_cnt);\n \tfunc_info = add_data(gen, load_attr-\u003efunc_info, func_info_tot_sz);\n-\tpr_debug(\"gen: prog_load: func_info: off %d cnt %d rec size %d\\n\",\n+\tpr_debug(\"gen: prog_load: func_info: off %d cnt %u rec size %u\\n\",\n \t\t func_info, load_attr-\u003efunc_info_cnt,\n \t\t load_attr-\u003efunc_info_rec_size);\n \n \tattr.line_info_rec_size = tgt_endian(load_attr-\u003eline_info_rec_size);\n \tattr.line_info_cnt = tgt_endian(load_attr-\u003eline_info_cnt);\n \tline_info = add_data(gen, load_attr-\u003eline_info, line_info_tot_sz);\n-\tpr_debug(\"gen: prog_load: line_info: off %d cnt %d rec size %d\\n\",\n+\tpr_debug(\"gen: prog_load: line_info: off %d cnt %u rec size %u\\n\",\n \t\t line_info, load_attr-\u003eline_info_cnt,\n \t\t load_attr-\u003eline_info_rec_size);\n \n \tattr.core_relo_rec_size = tgt_endian((__u32)sizeof(struct bpf_core_relo));\n \tattr.core_relo_cnt = tgt_endian(gen-\u003ecore_relo_cnt);\n \tcore_relos = add_data(gen, gen-\u003ecore_relos, core_relo_tot_sz);\n-\tpr_debug(\"gen: prog_load: core_relos: off %d cnt %d rec size %zd\\n\",\n+\tpr_debug(\"gen: prog_load: core_relos: off %d cnt %d rec size %zu\\n\",\n \t\t core_relos, gen-\u003ecore_relo_cnt,\n \t\t sizeof(struct bpf_core_relo));\n \n@@ -1234,7 +1234,7 @@ void bpf_gen__map_update_elem(struct bpf_gen *gen, int map_idx, void *pvalue,\n \t}\n \n \tmap_update_attr = add_data(gen, \u0026attr, attr_size);\n-\tpr_debug(\"gen: map_update_elem: idx %d, value: off %d size %d, attr: off %d size %d\\n\",\n+\tpr_debug(\"gen: map_update_elem: idx %d, value: off %d size %u, attr: off %d size %d\\n\",\n \t\t map_idx, value, value_size, map_update_attr, attr_size);\n \tmove_blob2blob(gen, attr_field(map_update_attr, map_fd), 4,\n \t\t       blob_fd_array_off(gen, map_idx));\ndiff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c\nindex 1368752aa13c39..7162146280a80e 100644\n--- a/tools/lib/bpf/libbpf.c\n+++ b/tools/lib/bpf/libbpf.c\n@@ -1486,7 +1486,7 @@ static int init_struct_ops_maps(struct bpf_object *obj, const char *sec_name,\n \t\t       type-\u003esize);\n \t\tst_ops-\u003etype_id = type_id;\n \n-\t\tpr_debug(\"struct_ops init: struct %s(type_id=%u) %s found at offset %u\\n\",\n+\t\tpr_debug(\"struct_ops init: struct %s(type_id=%d) %s found at offset %u\\n\",\n \t\t\t tname, type_id, var_name, vsi-\u003eoffset);\n \t}\n \n@@ -2626,7 +2626,7 @@ int parse_btf_map_def(const char *map_name, struct btf *btf,\n \n \t\t\tt = btf__type_by_id(btf, m-\u003etype);\n \t\t\tif (!t) {\n-\t\t\t\tpr_warn(\"map '%s': key type [%d] not found.\\n\",\n+\t\t\t\tpr_warn(\"map '%s': key type [%u] not found.\\n\",\n \t\t\t\t\tmap_name, m-\u003etype);\n \t\t\t\treturn -EINVAL;\n \t\t\t}\n@@ -2666,7 +2666,7 @@ int parse_btf_map_def(const char *map_name, struct btf *btf,\n \n \t\t\tt = btf__type_by_id(btf, m-\u003etype);\n \t\t\tif (!t) {\n-\t\t\t\tpr_warn(\"map '%s': value type [%d] not found.\\n\",\n+\t\t\t\tpr_warn(\"map '%s': value type [%u] not found.\\n\",\n \t\t\t\t\tmap_name, m-\u003etype);\n \t\t\t\treturn -EINVAL;\n \t\t\t}\n@@ -2720,7 +2720,7 @@ int parse_btf_map_def(const char *map_name, struct btf *btf,\n \t\t\tmap_def-\u003evalue_size = 4;\n \t\t\tt = btf__type_by_id(btf, m-\u003etype);\n \t\t\tif (!t) {\n-\t\t\t\tpr_warn(\"map '%s': %s type [%d] not found.\\n\",\n+\t\t\t\tpr_warn(\"map '%s': %s type [%u] not found.\\n\",\n \t\t\t\t\tmap_name, desc, m-\u003etype);\n \t\t\t\treturn -EINVAL;\n \t\t\t}\n@@ -3476,7 +3476,7 @@ static int btf_fixup_datasec(struct bpf_object *obj, struct btf *btf,\n \n \t\tvar_name = btf__name_by_offset(btf, t_var-\u003ename_off);\n \t\tif (!var_name) {\n-\t\t\tpr_debug(\"sec '%s': failed to find name of DATASEC's member #%d\\n\",\n+\t\t\tpr_debug(\"sec '%s': failed to find name of DATASEC's member #%u\\n\",\n \t\t\t\t sec_name, i);\n \t\t\treturn -ENOENT;\n \t\t}\n@@ -3971,7 +3971,7 @@ static int bpf_object__elf_collect(struct bpf_object *obj)\n \t\tif (!data)\n \t\t\treturn -LIBBPF_ERRNO__FORMAT;\n \n-\t\tpr_debug(\"elf: section(%d) %s, size %ld, link %d, flags %lx, type=%d\\n\",\n+\t\tpr_debug(\"elf: section(%d) %s, size %lu, link %d, flags %lx, type=%d\\n\",\n \t\t\t idx, name, (unsigned long)data-\u003ed_size,\n \t\t\t (int)sh-\u003esh_link, (unsigned long)sh-\u003esh_flags,\n \t\t\t (int)sh-\u003esh_type);\n@@ -4494,7 +4494,7 @@ static int bpf_object__collect_externs(struct bpf_object *obj)\n \n \t\t\text-\u003ekcfg.data_off = roundup(off, ext-\u003ekcfg.align);\n \t\t\toff = ext-\u003ekcfg.data_off + ext-\u003ekcfg.sz;\n-\t\t\tpr_debug(\"extern (kcfg) #%d: symbol %d, off %u, name %s\\n\",\n+\t\t\tpr_debug(\"extern (kcfg) #%d: symbol %d, off %d, name %s\\n\",\n \t\t\t\t i, ext-\u003esym_idx, ext-\u003ekcfg.data_off, ext-\u003ename);\n \t\t}\n \t\tsec-\u003esize = off;\n@@ -4626,7 +4626,7 @@ static int bpf_program__record_reloc(struct bpf_program *prog,\n \tstruct bpf_map *map;\n \n \tif (!is_call_insn(insn) \u0026\u0026 !is_ldimm64_insn(insn)) {\n-\t\tpr_warn(\"prog '%s': invalid relo against '%s' for insns[%d].code 0x%x\\n\",\n+\t\tpr_warn(\"prog '%s': invalid relo against '%s' for insns[%u].code 0x%x\\n\",\n \t\t\tprog-\u003ename, sym_name, insn_idx, insn-\u003ecode);\n \t\treturn -LIBBPF_ERRNO__RELOC;\n \t}\n@@ -4749,7 +4749,7 @@ static int bpf_program__record_reloc(struct bpf_program *prog,\n \t\t\t    map-\u003esec_idx != sym-\u003est_shndx ||\n \t\t\t    map-\u003esec_offset != sym-\u003est_value)\n \t\t\t\tcontinue;\n-\t\t\tpr_debug(\"prog '%s': found map %zd (%s, sec %d, off %zu) for insn #%u\\n\",\n+\t\t\tpr_debug(\"prog '%s': found map %zu (%s, sec %d, off %zu) for insn #%u\\n\",\n \t\t\t\t prog-\u003ename, map_idx, map-\u003ename, map-\u003esec_idx,\n \t\t\t\t map-\u003esec_offset, insn_idx);\n \t\t\tbreak;\n@@ -4776,7 +4776,7 @@ static int bpf_program__record_reloc(struct bpf_program *prog,\n \t\tmap = \u0026obj-\u003emaps[map_idx];\n \t\tif (map-\u003elibbpf_type != type || map-\u003esec_idx != sym-\u003est_shndx)\n \t\t\tcontinue;\n-\t\tpr_debug(\"prog '%s': found data map %zd (%s, sec %d, off %zu) for insn %u\\n\",\n+\t\tpr_debug(\"prog '%s': found data map %zu (%s, sec %d, off %zu) for insn %u\\n\",\n \t\t\t prog-\u003ename, map_idx, map-\u003ename, map-\u003esec_idx,\n \t\t\t map-\u003esec_offset, insn_idx);\n \t\tbreak;\n@@ -4985,7 +4985,7 @@ static int bpf_get_map_info_from_fdinfo(int fd, struct bpf_map_info *info)\n \t\t\tinfo-\u003evalue_size = val;\n \t\telse if (sscanf(buff, \"max_entries:\\t%u\", \u0026val) == 1)\n \t\t\tinfo-\u003emax_entries = val;\n-\t\telse if (sscanf(buff, \"map_flags:\\t%i\", \u0026val) == 1)\n+\t\telse if (sscanf(buff, \"map_flags:\\t%x\", \u0026val) == 1)\n \t\t\tinfo-\u003emap_flags = val;\n \t}\n \n@@ -5521,11 +5521,11 @@ static int init_map_in_map_slots(struct bpf_object *obj, struct bpf_map *map)\n \t\t}\n \t\tif (err) {\n \t\t\terr = -errno;\n-\t\t\tpr_warn(\"map '%s': failed to initialize slot [%d] to map '%s' fd=%d: %s\\n\",\n+\t\t\tpr_warn(\"map '%s': failed to initialize slot [%u] to map '%s' fd=%d: %s\\n\",\n \t\t\t\tmap-\u003ename, i, targ_map-\u003ename, fd, errstr(err));\n \t\t\treturn err;\n \t\t}\n-\t\tpr_debug(\"map '%s': slot [%d] set to map '%s' fd=%d\\n\",\n+\t\tpr_debug(\"map '%s': slot [%u] set to map '%s' fd=%d\\n\",\n \t\t\t map-\u003ename, i, targ_map-\u003ename, fd);\n \t}\n \n@@ -5554,11 +5554,11 @@ static int init_prog_array_slots(struct bpf_object *obj, struct bpf_map *map)\n \t\terr = bpf_map_update_elem(map-\u003efd, \u0026i, \u0026fd, 0);\n \t\tif (err) {\n \t\t\terr = -errno;\n-\t\t\tpr_warn(\"map '%s': failed to initialize slot [%d] to prog '%s' fd=%d: %s\\n\",\n+\t\t\tpr_warn(\"map '%s': failed to initialize slot [%u] to prog '%s' fd=%d: %s\\n\",\n \t\t\t\tmap-\u003ename, i, targ_prog-\u003ename, fd, errstr(err));\n \t\t\treturn err;\n \t\t}\n-\t\tpr_debug(\"map '%s': slot [%d] set to prog '%s' fd=%d\\n\",\n+\t\tpr_debug(\"map '%s': slot [%u] set to prog '%s' fd=%d\\n\",\n \t\t\t map-\u003ename, i, targ_prog-\u003ename, fd);\n \t}\n \n@@ -5788,7 +5788,7 @@ int bpf_core_add_cands(struct bpf_core_cand *local_cand,\n \t\tif (strncmp(local_name, targ_name, local_essent_len) != 0)\n \t\t\tcontinue;\n \n-\t\tpr_debug(\"CO-RE relocating [%d] %s %s: found target candidate [%d] %s %s in [%s]\\n\",\n+\t\tpr_debug(\"CO-RE relocating [%u] %s %s: found target candidate [%d] %s %s in [%s]\\n\",\n \t\t\t local_cand-\u003eid, btf_kind_str(local_t),\n \t\t\t local_name, i, btf_kind_str(t), targ_name,\n \t\t\t targ_btf_name);\n@@ -5848,7 +5848,7 @@ static int load_module_btfs(struct bpf_object *obj)\n \t\t\tif (errno == ENOENT)\n \t\t\t\tcontinue; /* expected race: BTF was unloaded */\n \t\t\terr = -errno;\n-\t\t\tpr_warn(\"failed to get BTF object #%d FD: %s\\n\", id, errstr(err));\n+\t\t\tpr_warn(\"failed to get BTF object #%u FD: %s\\n\", id, errstr(err));\n \t\t\treturn err;\n \t\t}\n \n@@ -5861,7 +5861,7 @@ static int load_module_btfs(struct bpf_object *obj)\n \t\terr = bpf_btf_get_info_by_fd(fd, \u0026info, \u0026len);\n \t\tif (err) {\n \t\t\terr = -errno;\n-\t\t\tpr_warn(\"failed to get BTF object #%d info: %s\\n\", id, errstr(err));\n+\t\t\tpr_warn(\"failed to get BTF object #%u info: %s\\n\", id, errstr(err));\n \t\t\tbreak;\n \t\t}\n \n@@ -5874,7 +5874,7 @@ static int load_module_btfs(struct bpf_object *obj)\n \t\tbtf = btf_get_from_fd(fd, obj-\u003ebtf_vmlinux);\n \t\terr = libbpf_get_error(btf);\n \t\tif (err) {\n-\t\t\tpr_warn(\"failed to load module [%s]'s BTF object #%d: %s\\n\",\n+\t\t\tpr_warn(\"failed to load module [%s]'s BTF object #%u: %s\\n\",\n \t\t\t\tname, id, errstr(err));\n \t\t\tbreak;\n \t\t}\n@@ -6067,7 +6067,7 @@ static int bpf_core_resolve_relo(struct bpf_program *prog,\n \t    !hashmap__find(cand_cache, local_id, \u0026cands)) {\n \t\tcands = bpf_core_find_cands(prog-\u003eobj, local_btf, local_id);\n \t\tif (IS_ERR(cands)) {\n-\t\t\tpr_warn(\"prog '%s': relo #%d: target candidate search failed for [%d] %s %s: %ld\\n\",\n+\t\t\tpr_warn(\"prog '%s': relo #%d: target candidate search failed for [%u] %s %s: %ld\\n\",\n \t\t\t\tprog_name, relo_idx, local_id, btf_kind_str(local_type),\n \t\t\t\tlocal_name, PTR_ERR(cands));\n \t\t\treturn PTR_ERR(cands);\n@@ -6127,7 +6127,7 @@ bpf_object__relocate_core(struct bpf_object *obj, const char *targ_btf_path)\n \t\t\tgoto out;\n \t\t}\n \n-\t\tpr_debug(\"sec '%s': found %d CO-RE relocations\\n\", sec_name, sec-\u003enum_info);\n+\t\tpr_debug(\"sec '%s': found %u CO-RE relocations\\n\", sec_name, sec-\u003enum_info);\n \n \t\tfor_each_btf_ext_rec(seg, sec, i, rec) {\n \t\t\tif (rec-\u003einsn_off % BPF_INSN_SZ)\n@@ -6181,7 +6181,7 @@ bpf_object__relocate_core(struct bpf_object *obj, const char *targ_btf_path)\n \n \t\t\terr = bpf_core_patch_insn(prog-\u003ename, insn, insn_idx, rec, i, \u0026targ_res);\n \t\t\tif (err) {\n-\t\t\t\tpr_warn(\"prog '%s': relo #%d: failed to patch insn #%u: %s\\n\",\n+\t\t\t\tpr_warn(\"prog '%s': relo #%d: failed to patch insn #%d: %s\\n\",\n \t\t\t\t\tprog-\u003ename, i, insn_idx, errstr(err));\n \t\t\t\tgoto out;\n \t\t\t}\n@@ -6346,7 +6346,7 @@ static int create_jt_map(struct bpf_object *obj, struct bpf_program *prog, struc\n \t\tgoto err_close;\n \t}\n \tif (sym_off + jt_size \u003e obj-\u003ejumptables_data_sz) {\n-\t\tpr_warn(\"map '.jumptables': jumptables_data size is %zd, trying to access %d\\n\",\n+\t\tpr_warn(\"map '.jumptables': jumptables_data size is %zu, trying to access %u\\n\",\n \t\t\tobj-\u003ejumptables_data_sz, sym_off + jt_size);\n \t\terr = -EINVAL;\n \t\tgoto err_close;\n@@ -6381,7 +6381,7 @@ static int create_jt_map(struct bpf_object *obj, struct bpf_program *prog, struc\n \t\t */\n \t\tif (insn_off \u003e UINT32_MAX) {\n \t\t\tpr_warn(\"map '.jumptables': invalid jump table value 0x%llx at offset %u\\n\",\n-\t\t\t\t(long long)jt[i], sym_off + i * jt_entry_size);\n+\t\t\t\t(unsigned long long)jt[i], sym_off + i * jt_entry_size);\n \t\t\terr = -EINVAL;\n \t\t\tgoto err_close;\n \t\t}\n@@ -6517,7 +6517,7 @@ bpf_object__relocate_data(struct bpf_object *obj, struct bpf_program *prog)\n \t\t}\n \t\t\tbreak;\n \t\tdefault:\n-\t\t\tpr_warn(\"prog '%s': relo #%d: bad relo type %d\\n\",\n+\t\t\tpr_warn(\"prog '%s': relo #%d: bad relo type %u\\n\",\n \t\t\t\tprog-\u003ename, i, relo-\u003etype);\n \t\t\treturn -EINVAL;\n \t\t}\n@@ -6797,7 +6797,7 @@ bpf_object__reloc_code(struct bpf_object *obj, struct bpf_program *main_prog,\n \t\t\t */\n \t\t\tcontinue;\n \t\tif (relo \u0026\u0026 relo-\u003etype != RELO_CALL \u0026\u0026 relo-\u003etype != RELO_SUBPROG_ADDR) {\n-\t\t\tpr_warn(\"prog '%s': unexpected relo for insn #%zu, type %d\\n\",\n+\t\t\tpr_warn(\"prog '%s': unexpected relo for insn #%zu, type %u\\n\",\n \t\t\t\tprog-\u003ename, insn_idx, relo-\u003etype);\n \t\t\treturn -LIBBPF_ERRNO__RELOC;\n \t\t}\n@@ -7587,7 +7587,7 @@ static int bpf_object__collect_map_relos(struct bpf_object *obj,\n \t\t}\n \t\tname = elf_sym_str(obj, sym-\u003est_name) ?: \"\u003c?\u003e\";\n \n-\t\tpr_debug(\".maps relo #%d: for %zd value %zd rel-\u003er_offset %zu name %d ('%s')\\n\",\n+\t\tpr_debug(\".maps relo #%d: for %zd value %zu rel-\u003er_offset %zu name %u ('%s')\\n\",\n \t\t\t i, (ssize_t)(rel-\u003er_info \u003e\u003e 32), (size_t)sym-\u003est_value,\n \t\t\t (size_t)rel-\u003er_offset, sym-\u003est_name, name);\n \n@@ -7678,7 +7678,7 @@ static int bpf_object__collect_map_relos(struct bpf_object *obj,\n \t\t}\n \t\tmap-\u003einit_slots[moff] = is_map_in_map ? (void *)targ_map : (void *)targ_prog;\n \n-\t\tpr_debug(\".maps relo #%d: map '%s' slot [%d] points to %s '%s'\\n\",\n+\t\tpr_debug(\".maps relo #%d: map '%s' slot [%u] points to %s '%s'\\n\",\n \t\t\t i, map-\u003ename, moff, type, name);\n \t}\n \n@@ -8738,7 +8738,7 @@ static int bpf_object__resolve_ksym_var_btf_id(struct bpf_object *obj,\n \t\tlocal_name = btf__name_by_offset(obj-\u003ebtf, local_type-\u003ename_off);\n \t\ttarg_name = btf__name_by_offset(btf, targ_type-\u003ename_off);\n \n-\t\tpr_warn(\"extern (var ksym) '%s': incompatible types, expected [%d] %s %s, but kernel has [%d] %s %s\\n\",\n+\t\tpr_warn(\"extern (var ksym) '%s': incompatible types, expected [%u] %s %s, but kernel has [%u] %s %s\\n\",\n \t\t\text-\u003ename, local_type_id,\n \t\t\tbtf_kind_str(local_type), local_name, targ_type_id,\n \t\t\tbtf_kind_str(targ_type), targ_name);\n@@ -8915,7 +8915,7 @@ static int bpf_object__resolve_externs(struct bpf_object *obj,\n \t\t\tif (err)\n \t\t\t\treturn err;\n \t\t\tpr_debug(\"extern (kcfg) '%s': set to 0x%llx\\n\",\n-\t\t\t\t ext-\u003ename, (long long)value);\n+\t\t\t\t ext-\u003ename, (unsigned long long)value);\n \t\t} else {\n \t\t\tpr_warn(\"extern '%s': unrecognized extern kind\\n\", ext-\u003ename);\n \t\t\treturn -EINVAL;\n@@ -10494,7 +10494,7 @@ static int bpf_object__collect_st_ops_relos(struct bpf_object *obj,\n \t\tmoff = rel-\u003er_offset - map-\u003esec_offset;\n \t\tshdr_idx = sym-\u003est_shndx;\n \t\tst_ops = map-\u003est_ops;\n-\t\tpr_debug(\"struct_ops reloc %s: for %lld value %lld shdr_idx %u rel-\u003er_offset %zu map-\u003esec_offset %zu name %d (\\'%s\\')\\n\",\n+\t\tpr_debug(\"struct_ops reloc %s: for %lld value %lld shdr_idx %u rel-\u003er_offset %zu map-\u003esec_offset %zu name %u (\\'%s\\')\\n\",\n \t\t\t map-\u003ename,\n \t\t\t (long long)(rel-\u003er_info \u003e\u003e 32),\n \t\t\t (long long)sym-\u003est_value,\n@@ -10643,7 +10643,7 @@ static int libbpf_find_prog_btf_id(const char *name, __u32 attach_prog_fd, int t\n \tmemset(\u0026info, 0, info_len);\n \terr = bpf_prog_get_info_by_fd(attach_prog_fd, \u0026info, \u0026info_len);\n \tif (err) {\n-\t\tpr_warn(\"failed bpf_prog_get_info_by_fd for FD %d: %s\\n\",\n+\t\tpr_warn(\"failed bpf_prog_get_info_by_fd for FD %u: %s\\n\",\n \t\t\tattach_prog_fd, errstr(err));\n \t\treturn err;\n \t}\n@@ -10656,7 +10656,7 @@ static int libbpf_find_prog_btf_id(const char *name, __u32 attach_prog_fd, int t\n \tbtf = btf_load_from_kernel(info.btf_id, NULL, token_fd);\n \terr = libbpf_get_error(btf);\n \tif (err) {\n-\t\tpr_warn(\"Failed to get BTF %d of the program: %s\\n\", info.btf_id, errstr(err));\n+\t\tpr_warn(\"Failed to get BTF %u of the program: %s\\n\", info.btf_id, errstr(err));\n \t\tgoto out;\n \t}\n \terr = btf__find_by_name_kind(btf, name, BTF_KIND_FUNC);\n@@ -10738,7 +10738,7 @@ static int libbpf_find_attach_btf_id(struct bpf_program *prog, const char *attac\n \t\t}\n \t\terr = libbpf_find_prog_btf_id(attach_name, attach_prog_fd, prog-\u003eobj-\u003etoken_fd);\n \t\tif (err \u003c 0) {\n-\t\t\tpr_warn(\"prog '%s': failed to find BPF program (FD %d) BTF ID for '%s': %s\\n\",\n+\t\t\tpr_warn(\"prog '%s': failed to find BPF program (FD %u) BTF ID for '%s': %s\\n\",\n \t\t\t\tprog-\u003ename, attach_prog_fd, attach_name, errstr(err));\n \t\t\treturn err;\n \t\t}\n@@ -11233,7 +11233,7 @@ static int validate_map_op(const struct bpf_map *map, size_t key_sz,\n \t\t}\n \n \t\tif (value_sz != num_cpu * elem_sz) {\n-\t\t\tpr_warn(\"map '%s': unexpected value size %zu provided for per-CPU map, expected %d * %zu = %zd\\n\",\n+\t\t\tpr_warn(\"map '%s': unexpected value size %zu provided for per-CPU map, expected %d * %zu = %zu\\n\",\n \t\t\t\tmap-\u003ename, value_sz, num_cpu, elem_sz, num_cpu * elem_sz);\n \t\t\treturn -EINVAL;\n \t\t}\n@@ -11774,7 +11774,7 @@ static void gen_probe_legacy_event_name(char *buf, size_t buf_sz,\n \tstatic int index = 0;\n \tint i;\n \n-\tsnprintf(buf, buf_sz, \"libbpf_%u_%d_%s_0x%zx\", getpid(),\n+\tsnprintf(buf, buf_sz, \"libbpf_%d_%d_%s_0x%zx\", getpid(),\n \t\t __sync_fetch_and_add(\u0026index, 1), name, offset);\n \n \t/* sanitize name in the probe name */\n@@ -12924,8 +12924,8 @@ static long elf_find_func_offset_from_archive(const char *archive_path, const ch\n \tret = elf_find_func_offset(elf, file_name, func_name);\n \tif (ret \u003e 0) {\n \t\tpr_debug(\"elf: symbol address match for %s of %s in %s: 0x%x + 0x%lx = 0x%lx\\n\",\n-\t\t\t func_name, file_name, archive_path, entry.data_offset, ret,\n-\t\t\t ret + entry.data_offset);\n+\t\t\t func_name, file_name, archive_path, entry.data_offset, (unsigned long)ret,\n+\t\t\t (unsigned long)(ret + entry.data_offset));\n \t\tret += entry.data_offset;\n \t}\n \telf_end(elf);\n@@ -14570,7 +14570,7 @@ perf_buffer__process_record(struct perf_event_header *e, void *ctx)\n \t\tbreak;\n \t}\n \tdefault:\n-\t\tpr_warn(\"unknown perf sample type %d\\n\", e-\u003etype);\n+\t\tpr_warn(\"unknown perf sample type %u\\n\", e-\u003etype);\n \t\treturn LIBBPF_PERF_EVENT_ERROR;\n \t}\n \treturn LIBBPF_PERF_EVENT_CONT;\ndiff --git a/tools/lib/bpf/nlattr.c b/tools/lib/bpf/nlattr.c\nindex 06663f9ea581f9..007fe17d17b429 100644\n--- a/tools/lib/bpf/nlattr.c\n+++ b/tools/lib/bpf/nlattr.c\n@@ -123,7 +123,7 @@ int libbpf_nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head,\n \n \t\tif (tb[type]) {\n \t\t\tpr_warn(\"Attribute of type %#x found multiple times in message, \"\n-\t\t\t\t\"previous attribute is being ignored.\\n\", type);\n+\t\t\t\t\"previous attribute is being ignored.\\n\", (unsigned)type);\n \t\t}\n \n \t\ttb[type] = nla;\ndiff --git a/tools/lib/bpf/relo_core.c b/tools/lib/bpf/relo_core.c\nindex 6ae3f2a15ad0cf..8ad2715721cfd3 100644\n--- a/tools/lib/bpf/relo_core.c\n+++ b/tools/lib/bpf/relo_core.c\n@@ -216,7 +216,7 @@ int __bpf_core_types_are_compat(const struct btf *local_btf, __u32 local_id,\n \t\tgoto recur;\n \t}\n \tdefault:\n-\t\tpr_warn(\"unexpected kind %s relocated, local [%d], target [%d]\\n\",\n+\t\tpr_warn(\"unexpected kind %s relocated, local [%u], target [%u]\\n\",\n \t\t\tbtf_kind_str(local_type), local_id, targ_id);\n \t\treturn 0;\n \t}\n@@ -384,7 +384,7 @@ int bpf_core_parse_spec(const char *prog_name, const struct btf *btf,\n \t\t\t\treturn sz;\n \t\t\tspec-\u003ebit_offset += access_idx * sz * 8;\n \t\t} else {\n-\t\t\tpr_warn(\"prog '%s': relo for [%u] %s (at idx %d) captures type [%d] of unexpected kind %s\\n\",\n+\t\t\tpr_warn(\"prog '%s': relo for [%u] %s (at idx %d) captures type [%u] of unexpected kind %s\\n\",\n \t\t\t\tprog_name, relo-\u003etype_id, spec_str, i, id, btf_kind_str(t));\n \t\t\treturn -EINVAL;\n \t\t}\n@@ -725,7 +725,7 @@ static int bpf_core_calc_field_relo(const char *prog_name,\n \t\t\t\treturn -EINVAL;\n \t\t\t*val = sz;\n \t\t} else {\n-\t\t\tpr_warn(\"prog '%s': relo %d at insn #%d can't be applied to array access\\n\",\n+\t\t\tpr_warn(\"prog '%s': relo %u at insn #%u can't be applied to array access\\n\",\n \t\t\t\tprog_name, relo-\u003ekind, relo-\u003einsn_off / 8);\n \t\t\treturn -EINVAL;\n \t\t}\n@@ -747,7 +747,7 @@ static int bpf_core_calc_field_relo(const char *prog_name,\n \t\twhile (bit_off + bit_sz - byte_off * 8 \u003e byte_sz * 8) {\n \t\t\tif (byte_sz \u003e= 8) {\n \t\t\t\t/* bitfield can't be read with 64-bit read */\n-\t\t\t\tpr_warn(\"prog '%s': relo %d at insn #%d can't be satisfied for bitfield\\n\",\n+\t\t\t\tpr_warn(\"prog '%s': relo %u at insn #%u can't be satisfied for bitfield\\n\",\n \t\t\t\t\tprog_name, relo-\u003ekind, relo-\u003einsn_off / 8);\n \t\t\t\treturn -E2BIG;\n \t\t\t}\n@@ -971,7 +971,7 @@ static int bpf_core_calc_relo(const char *prog_name,\n \t\terr = 0;\n \t} else if (err == -EOPNOTSUPP) {\n \t\t/* EOPNOTSUPP means unknown/unsupported relocation */\n-\t\tpr_warn(\"prog '%s': relo #%d: unrecognized CO-RE relocation %s (%d) at insn #%d\\n\",\n+\t\tpr_warn(\"prog '%s': relo #%d: unrecognized CO-RE relocation %s (%u) at insn #%u\\n\",\n \t\t\tprog_name, relo_idx, core_relo_kind_str(relo-\u003ekind),\n \t\t\trelo-\u003ekind, relo-\u003einsn_off / 8);\n \t}\n@@ -1067,7 +1067,7 @@ int bpf_core_patch_insn(const char *prog_name, struct bpf_insn *insn,\n \t\tif (BPF_SRC(insn-\u003ecode) != BPF_K)\n \t\t\treturn -EINVAL;\n \t\tif (res-\u003evalidate \u0026\u0026 insn-\u003eimm != orig_val) {\n-\t\t\tpr_warn(\"prog '%s': relo #%d: unexpected insn #%d (ALU/ALU64) value: got %u, exp %llu -\u003e %llu\\n\",\n+\t\t\tpr_warn(\"prog '%s': relo #%d: unexpected insn #%d (ALU/ALU64) value: got %d, exp %llu -\u003e %llu\\n\",\n \t\t\t\tprog_name, relo_idx,\n \t\t\t\tinsn_idx, insn-\u003eimm, (unsigned long long)orig_val,\n \t\t\t\t(unsigned long long)new_val);\n@@ -1083,7 +1083,7 @@ int bpf_core_patch_insn(const char *prog_name, struct bpf_insn *insn,\n \tcase BPF_ST:\n \tcase BPF_STX:\n \t\tif (res-\u003evalidate \u0026\u0026 insn-\u003eoff != orig_val) {\n-\t\t\tpr_warn(\"prog '%s': relo #%d: unexpected insn #%d (LDX/ST/STX) value: got %u, exp %llu -\u003e %llu\\n\",\n+\t\t\tpr_warn(\"prog '%s': relo #%d: unexpected insn #%d (LDX/ST/STX) value: got %d, exp %llu -\u003e %llu\\n\",\n \t\t\t\tprog_name, relo_idx, insn_idx, insn-\u003eoff, (unsigned long long)orig_val,\n \t\t\t\t(unsigned long long)new_val);\n \t\t\treturn -EINVAL;\n@@ -1159,7 +1159,7 @@ int bpf_core_patch_insn(const char *prog_name, struct bpf_insn *insn,\n \tdefault:\n \t\tpr_warn(\"prog '%s': relo #%d: trying to relocate unrecognized insn #%d, code:0x%x, src:0x%x, dst:0x%x, off:0x%x, imm:0x%x\\n\",\n \t\t\tprog_name, relo_idx, insn_idx, insn-\u003ecode,\n-\t\t\tinsn-\u003esrc_reg, insn-\u003edst_reg, insn-\u003eoff, insn-\u003eimm);\n+\t\t\t(unsigned)insn-\u003esrc_reg, (unsigned)insn-\u003edst_reg, (unsigned)insn-\u003eoff, (unsigned)insn-\u003eimm);\n \t\treturn -EINVAL;\n \t}\n \n@@ -1323,7 +1323,7 @@ int bpf_core_calc_relo_insn(const char *prog_name,\n \t\tconst char *spec_str;\n \n \t\tspec_str = btf__name_by_offset(local_btf, relo-\u003eaccess_str_off);\n-\t\tpr_warn(\"prog '%s': relo #%d: parsing [%d] %s %s + %s failed: %d\\n\",\n+\t\tpr_warn(\"prog '%s': relo #%d: parsing [%u] %s %s + %s failed: %d\\n\",\n \t\t\tprog_name, relo_idx, local_id, btf_kind_str(local_type),\n \t\t\tstr_is_empty(local_name) ? \"\u003canon\u003e\" : local_name,\n \t\t\tspec_str ?: \"\u003c?\u003e\", err);\n@@ -1346,7 +1346,7 @@ int bpf_core_calc_relo_insn(const char *prog_name,\n \n \t/* libbpf doesn't support candidate search for anonymous types */\n \tif (str_is_empty(local_name)) {\n-\t\tpr_warn(\"prog '%s': relo #%d: \u003c%s\u003e (%d) relocation doesn't support anonymous types\\n\",\n+\t\tpr_warn(\"prog '%s': relo #%d: \u003c%s\u003e (%u) relocation doesn't support anonymous types\\n\",\n \t\t\tprog_name, relo_idx, core_relo_kind_str(relo-\u003ekind), relo-\u003ekind);\n \t\treturn -EOPNOTSUPP;\n \t}\n@@ -1697,7 +1697,7 @@ int __bpf_core_types_match(const struct btf *local_btf, __u32 local_id, const st\n \t\tgoto recur;\n \t}\n \tdefault:\n-\t\tpr_warn(\"unexpected kind %s relocated, local [%d], target [%d]\\n\",\n+\t\tpr_warn(\"unexpected kind %s relocated, local [%u], target [%u]\\n\",\n \t\t\tbtf_kind_str(local_t), local_id, targ_id);\n \t\treturn 0;\n \t}\ndiff --git a/tools/lib/bpf/usdt.c b/tools/lib/bpf/usdt.c\nindex 57fb82bb81b588..db9432adb967b6 100644\n--- a/tools/lib/bpf/usdt.c\n+++ b/tools/lib/bpf/usdt.c\n@@ -327,7 +327,7 @@ static int sanity_check_usdt_elf(Elf *elf, const char *path)\n \tint endianness;\n \n \tif (elf_kind(elf) != ELF_K_ELF) {\n-\t\tpr_warn(\"usdt: unrecognized ELF kind %d for '%s'\\n\", elf_kind(elf), path);\n+\t\tpr_warn(\"usdt: unrecognized ELF kind %u for '%s'\\n\", elf_kind(elf), path);\n \t\treturn -EBADF;\n \t}\n \n@@ -438,8 +438,9 @@ static int parse_elf_segs(Elf *elf, const char *path, struct elf_seg **segs, siz\n \t\t}\n \n \t\tpr_debug(\"usdt: discovered PHDR #%d in '%s': vaddr 0x%lx memsz 0x%lx offset 0x%lx type 0x%lx flags 0x%lx\\n\",\n-\t\t\t i, path, (long)phdr.p_vaddr, (long)phdr.p_memsz, (long)phdr.p_offset,\n-\t\t\t (long)phdr.p_type, (long)phdr.p_flags);\n+\t\t\t i, path,\n+\t\t\t (unsigned long)phdr.p_vaddr, (unsigned long)phdr.p_memsz, (unsigned long)phdr.p_offset,\n+\t\t\t (unsigned long)phdr.p_type, (unsigned long)phdr.p_flags);\n \t\tif (phdr.p_type != PT_LOAD)\n \t\t\tcontinue;\n \n@@ -719,14 +720,14 @@ static int collect_usdt_targets(struct usdt_manager *man, struct elf_fd *elf_fd,\n \t\tif (!seg) {\n \t\t\terr = -ESRCH;\n \t\t\tpr_warn(\"usdt: failed to find ELF program segment for '%s:%s' in '%s' at IP 0x%lx\\n\",\n-\t\t\t\tusdt_provider, usdt_name, path, usdt_abs_ip);\n+\t\t\t\tusdt_provider, usdt_name, path, (unsigned long)usdt_abs_ip);\n \t\t\tgoto err_out;\n \t\t}\n \t\tif (!seg-\u003eis_exec) {\n \t\t\terr = -ESRCH;\n \t\t\tpr_warn(\"usdt: matched ELF binary '%s' segment [0x%lx, 0x%lx) for '%s:%s' at IP 0x%lx is not executable\\n\",\n-\t\t\t\tpath, seg-\u003estart, seg-\u003eend, usdt_provider, usdt_name,\n-\t\t\t\tusdt_abs_ip);\n+\t\t\t\tpath, (unsigned long)seg-\u003estart, (unsigned long)seg-\u003eend, usdt_provider, usdt_name,\n+\t\t\t\t(unsigned long)usdt_abs_ip);\n \t\t\tgoto err_out;\n \t\t}\n \t\t/* translate from virtual address to file offset */\n@@ -766,7 +767,7 @@ static int collect_usdt_targets(struct usdt_manager *man, struct elf_fd *elf_fd,\n \t\t\tif (!seg) {\n \t\t\t\terr = -ESRCH;\n \t\t\t\tpr_warn(\"usdt: failed to find shared lib memory segment for '%s:%s' in '%s' at relative IP 0x%lx\\n\",\n-\t\t\t\t\tusdt_provider, usdt_name, path, usdt_rel_ip);\n+\t\t\t\t\tusdt_provider, usdt_name, path, (unsigned long)usdt_rel_ip);\n \t\t\t\tgoto err_out;\n \t\t\t}\n \n@@ -775,8 +776,10 @@ static int collect_usdt_targets(struct usdt_manager *man, struct elf_fd *elf_fd,\n \n \t\tpr_debug(\"usdt: probe for '%s:%s' in %s '%s': addr 0x%lx base 0x%lx (resolved abs_ip 0x%lx rel_ip 0x%lx) args '%s' in segment [0x%lx, 0x%lx) at offset 0x%lx\\n\",\n \t\t\t usdt_provider, usdt_name, ehdr.e_type == ET_EXEC ? \"exec\" : \"lib \", path,\n-\t\t\t note.loc_addr, note.base_addr, usdt_abs_ip, usdt_rel_ip, note.args,\n-\t\t\t seg ? seg-\u003estart : 0, seg ? seg-\u003eend : 0, seg ? seg-\u003eoffset : 0);\n+\t\t\t (unsigned long)note.loc_addr, (unsigned long)note.base_addr,\n+\t\t\t (unsigned long)usdt_abs_ip, (unsigned long)usdt_rel_ip, note.args,\n+\t\t\t (unsigned long)(seg ? seg-\u003estart : 0), (unsigned long)(seg ? seg-\u003eend : 0),\n+\t\t\t (unsigned long)(seg ? seg-\u003eoffset : 0));\n \n \t\t/* Adjust semaphore address to be a file offset */\n \t\tif (note.sema_addr) {\n@@ -791,14 +794,14 @@ static int collect_usdt_targets(struct usdt_manager *man, struct elf_fd *elf_fd,\n \t\t\tif (!seg) {\n \t\t\t\terr = -ESRCH;\n \t\t\t\tpr_warn(\"usdt: failed to find ELF loadable segment with semaphore of '%s:%s' in '%s' at 0x%lx\\n\",\n-\t\t\t\t\tusdt_provider, usdt_name, path, note.sema_addr);\n+\t\t\t\t\tusdt_provider, usdt_name, path, (unsigned long)note.sema_addr);\n \t\t\t\tgoto err_out;\n \t\t\t}\n \t\t\tif (seg-\u003eis_exec) {\n \t\t\t\terr = -ESRCH;\n \t\t\t\tpr_warn(\"usdt: matched ELF binary '%s' segment [0x%lx, 0x%lx] for semaphore of '%s:%s' at 0x%lx is executable\\n\",\n-\t\t\t\t\tpath, seg-\u003estart, seg-\u003eend, usdt_provider, usdt_name,\n-\t\t\t\t\tnote.sema_addr);\n+\t\t\t\t\tpath, (unsigned long)seg-\u003estart, (unsigned long)seg-\u003eend, usdt_provider, usdt_name,\n+\t\t\t\t\t(unsigned long)note.sema_addr);\n \t\t\t\tgoto err_out;\n \t\t\t}\n \n@@ -806,8 +809,8 @@ static int collect_usdt_targets(struct usdt_manager *man, struct elf_fd *elf_fd,\n \n \t\t\tpr_debug(\"usdt: sema  for '%s:%s' in %s '%s': addr 0x%lx base 0x%lx (resolved 0x%lx) in segment [0x%lx, 0x%lx] at offset 0x%lx\\n\",\n \t\t\t\t usdt_provider, usdt_name, ehdr.e_type == ET_EXEC ? \"exec\" : \"lib \",\n-\t\t\t\t path, note.sema_addr, note.base_addr, usdt_sema_off,\n-\t\t\t\t seg-\u003estart, seg-\u003eend, seg-\u003eoffset);\n+\t\t\t\t path, (unsigned long)note.sema_addr, (unsigned long)note.base_addr, (unsigned long)usdt_sema_off,\n+\t\t\t\t (unsigned long)seg-\u003estart, (unsigned long)seg-\u003eend, (unsigned long)seg-\u003eoffset);\n \t\t}\n \n \t\t/* Record adjusted addresses and offsets and parse USDT spec */\n@@ -1117,7 +1120,7 @@ struct bpf_link *usdt_manager_attach_usdt(struct usdt_manager *man, const struct\n \t\t\t\t        spec_id, usdt_provider, usdt_name, path);\n \t\t\t} else {\n \t\t\t\tpr_warn(\"usdt: failed to map IP 0x%lx to spec #%d for '%s:%s' in '%s': %s\\n\",\n-\t\t\t\t\ttarget-\u003eabs_ip, spec_id, usdt_provider, usdt_name,\n+\t\t\t\t\t(unsigned long)target-\u003eabs_ip, spec_id, usdt_provider, usdt_name,\n \t\t\t\t\tpath, errstr(err));\n \t\t\t}\n \t\t\tgoto err_out;\n"
}

2/1 2026/06/26 10:56 agent patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch only modifies format specifiers in logging functions (pr_warn, pr_debug) and one sscanf call in user-space libbpf code (tools/lib/bpf/). It does not make any functional changes to the kernel execution flow.",
  "WorthFuzzing": false
}

Instruction:
You are an expert Linux kernel maintainer.
Your job is to review a provided patch series and determine
if it makes functional changes to the kernel that should be fuzzed.

IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively
use your code access tools to examine the actual source code and confirm any assumptions.

Return WorthFuzzing=false if the patch only contains:
- Modifications to Documentation/, Kconfig files, or code comments.
- Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints.
- Changes to numeric constants or macros that do not functionally alter execution flow.
- Code paths that are impossible to reach in virtualized environments like GCE or QEMU,
even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim).

If it modifies reachable core kernel logic, drivers, or architectures, use your code search
tools to verify the code can be executed, then return WorthFuzzing=true.

When returning WorthFuzzing=true, you MUST ALSO:
1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols.
   Avoid listing generic hot-path functions to prevent skewed test distributions.
2. Identify any specific CONFIG_ options required to properly test this new/modified feature.
   Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions.
   Do not list too generic configs (we already have them enabled). Only list those that
   specifically cover the modified code. List them in the EnableConfigs output array,
   and DO NOT add a 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
For your convenience, here is the diff of the changes:
commit a3aaa519c212a87d8d4df2e49c53678ac69d9cb6
Author: syz-cluster <triage@syzkaller.com>
Date:   Fri Jun 26 10:56:14 2026 +0000

    syz-cluster: applied patch under review

diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
index 823bce895178da..bf6a6811840513 100644
--- a/tools/lib/bpf/btf.c
+++ b/tools/lib/bpf/btf.c
@@ -589,7 +589,7 @@ static int btf_parse_type_sec(struct btf *btf)
 		if (type_size < 0)
 			return type_size;
 		if (next_type + type_size > end_type) {
-			pr_warn("BTF type [%d] is malformed\n", btf->start_id + btf->nr_types);
+			pr_warn("BTF type [%u] is malformed\n", btf->start_id + btf->nr_types);
 			return -EINVAL;
 		}
 
@@ -1424,7 +1424,7 @@ static int btf_find_elf_sections(Elf *elf, const char *path, struct btf_elf_secs
 			continue;
 
 		if (sh.sh_type != SHT_PROGBITS) {
-			pr_warn("unexpected section type (%d) of section(%d, %s) from %s\n",
+			pr_warn("unexpected section type (%u) of section(%d, %s) from %s\n",
 				sh.sh_type, idx, name, path);
 			goto err;
 		}
@@ -4854,7 +4854,7 @@ static bool btf_dedup_identical_types(struct btf_dedup *d, __u32 id1, __u32 id2,
 				continue;
 			if (!btf_dedup_identical_types(d, m1->type, m2->type, depth - 1)) {
 				if (t1->name_off) {
-					pr_debug("%s '%s' size=%d vlen=%d id1[%u] id2[%u] shallow-equal but not identical for field#%d '%s'\n",
+					pr_debug("%s '%s' size=%u vlen=%u id1[%u] id2[%u] shallow-equal but not identical for field#%d '%s'\n",
 						 k1 == BTF_KIND_STRUCT ? "STRUCT" : "UNION",
 						 btf__name_by_offset(d->btf, t1->name_off),
 						 t1->size, btf_vlen(t1), id1, id2, i,
@@ -5104,7 +5104,7 @@ static int btf_dedup_is_equiv(struct btf_dedup *d, __u32 cand_id,
 			eq = btf_dedup_is_equiv(d, cand_m->type, canon_m->type);
 			if (eq <= 0) {
 				if (cand_type->name_off) {
-					pr_debug("%s '%s' size=%d vlen=%d cand_id[%u] canon_id[%u] shallow-equal but not equiv for field#%d '%s': %d\n",
+					pr_debug("%s '%s' size=%u vlen=%u cand_id[%u] canon_id[%u] shallow-equal but not equiv for field#%d '%s': %d\n",
 						 cand_kind == BTF_KIND_STRUCT ? "STRUCT" : "UNION",
 						 btf__name_by_offset(d->btf, cand_type->name_off),
 						 cand_type->size, vlen, cand_id, canon_id, i,
@@ -6069,7 +6069,7 @@ static int btf_add_distilled_types(struct btf_distill *dist)
 			err = btf_add_type(&dist->pipe, t);
 			break;
 		default:
-			pr_warn("unexpected kind when adding base type '%s'[%u] of kind [%u] to distilled base BTF.\n",
+			pr_warn("unexpected kind when adding base type '%s'[%d] of kind [%d] to distilled base BTF.\n",
 				name, i, kind);
 			return -EINVAL;
 
diff --git a/tools/lib/bpf/btf_dump.c b/tools/lib/bpf/btf_dump.c
index cc1ba65bb6c5ac..123c448f20c746 100644
--- a/tools/lib/bpf/btf_dump.c
+++ b/tools/lib/bpf/btf_dump.c
@@ -1776,7 +1776,7 @@ static int btf_dump_get_bitfield_value(struct btf_dump *d,
 
 	/* Maximum supported bitfield size is 64 bits */
 	if (t->size > 8) {
-		pr_warn("unexpected bitfield size %d\n", t->size);
+		pr_warn("unexpected bitfield size %u\n", t->size);
 		return -EINVAL;
 	}
 
@@ -2251,7 +2251,7 @@ static int btf_dump_get_enum_value(struct btf_dump *d,
 		*value = is_signed ? *(__s8 *)data : *(__u8 *)data;
 		return 0;
 	default:
-		pr_warn("unexpected size %d for enum, id:[%u]\n", t->size, id);
+		pr_warn("unexpected size %u for enum, id:[%u]\n", t->size, id);
 		return -EINVAL;
 	}
 }
diff --git a/tools/lib/bpf/btf_relocate.c b/tools/lib/bpf/btf_relocate.c
index 53d1f3541bce69..df5fa4bd87d69a 100644
--- a/tools/lib/bpf/btf_relocate.c
+++ b/tools/lib/bpf/btf_relocate.c
@@ -280,7 +280,7 @@ static int btf_relocate_map_distilled_base(struct btf_relocate *r)
 		     cmp_btf_name_size(&base_info, dist_info) == 0;
 		     dist_info++) {
 			if (!dist_info->id || dist_info->id >= r->nr_dist_base_types) {
-				pr_warn("base BTF id [%d] maps to invalid distilled base BTF id [%d]\n",
+				pr_warn("base BTF id [%u] maps to invalid distilled base BTF id [%u]\n",
 					id, dist_info->id);
 				err = -EINVAL;
 				goto done;
@@ -368,7 +368,7 @@ static int btf_relocate_map_distilled_base(struct btf_relocate *r)
 			continue;
 		dist_t = btf_type_by_id(r->dist_base_btf, id);
 		name = btf__name_by_offset(r->dist_base_btf, dist_t->name_off);
-		pr_warn("distilled base BTF type '%s' [%d] is not mapped to base BTF id\n",
+		pr_warn("distilled base BTF type '%s' [%u] is not mapped to base BTF id\n",
 			name, id);
 		err = -EINVAL;
 		break;
@@ -397,11 +397,11 @@ static int btf_relocate_validate_distilled_base(struct btf_relocate *r)
 		case BTF_KIND_FWD:
 			if (t->name_off)
 				break;
-			pr_warn("type [%d], kind [%d] is invalid for distilled base BTF; it is anonymous\n",
+			pr_warn("type [%u], kind [%d] is invalid for distilled base BTF; it is anonymous\n",
 				i, kind);
 			return -EINVAL;
 		default:
-			pr_warn("type [%d] in distilled based BTF has unexpected kind [%d]\n",
+			pr_warn("type [%u] in distilled based BTF has unexpected kind [%d]\n",
 				i, kind);
 			return -EINVAL;
 		}
diff --git a/tools/lib/bpf/elf.c b/tools/lib/bpf/elf.c
index 295dbda2458071..fe136d0259679f 100644
--- a/tools/lib/bpf/elf.c
+++ b/tools/lib/bpf/elf.c
@@ -354,7 +354,7 @@ long elf_find_func_offset(Elf *elf, const char *binary_path, const char *name)
 
 	if (ret > 0) {
 		pr_debug("elf: symbol address match for '%s' in '%s': 0x%lx\n", name, binary_path,
-			 ret);
+			 (unsigned long)ret);
 	} else {
 		if (ret == 0) {
 			pr_warn("elf: '%s' is 0 in symtab for '%s': %s\n", name, binary_path,
diff --git a/tools/lib/bpf/gen_loader.c b/tools/lib/bpf/gen_loader.c
index d79695f01c87f3..c7f2d2ac7bb35f 100644
--- a/tools/lib/bpf/gen_loader.c
+++ b/tools/lib/bpf/gen_loader.c
@@ -384,7 +384,7 @@ int bpf_gen__finish(struct bpf_gen *gen, int nr_progs, int nr_maps)
 	int i;
 
 	if (nr_progs < gen->nr_progs || nr_maps != gen->nr_maps) {
-		pr_warn("nr_progs %d/%d nr_maps %d/%d mismatch\n",
+		pr_warn("nr_progs %d/%u nr_maps %d/%u mismatch\n",
 			nr_progs, gen->nr_progs, nr_maps, gen->nr_maps);
 		gen->error = -EFAULT;
 		return gen->error;
@@ -488,7 +488,7 @@ void bpf_gen__load_btf(struct bpf_gen *gen, const void *btf_raw_data,
 
 	attr.btf_size = tgt_endian(btf_raw_size);
 	btf_load_attr = add_data(gen, &attr, attr_size);
-	pr_debug("gen: load_btf: off %d size %d, attr: off %d size %d\n",
+	pr_debug("gen: load_btf: off %d size %u, attr: off %d size %d\n",
 		 btf_data, btf_raw_size, btf_load_attr, attr_size);
 
 	/* populate union bpf_attr with user provided log details */
@@ -534,7 +534,7 @@ void bpf_gen__map_create(struct bpf_gen *gen,
 	attr.btf_value_type_id = tgt_endian(map_attr->btf_value_type_id);
 
 	map_create_attr = add_data(gen, &attr, attr_size);
-	pr_debug("gen: map_create: %s idx %d type %d value_type_id %d, attr: off %d size %d\n",
+	pr_debug("gen: map_create: %s idx %d type %u value_type_id %u, attr: off %d size %d\n",
 		 map_name, map_idx, map_type, map_attr->btf_value_type_id,
 		 map_create_attr, attr_size);
 
@@ -1082,7 +1082,7 @@ void bpf_gen__prog_load(struct bpf_gen *gen,
 	license_off = add_data(gen, license, strlen(license) + 1);
 	/* add insns to blob of bytes */
 	insns_off = add_data(gen, insns, insn_cnt * sizeof(struct bpf_insn));
-	pr_debug("gen: prog_load: prog_idx %d type %d insn off %d insns_cnt %zd license off %d\n",
+	pr_debug("gen: prog_load: prog_idx %d type %u insn off %d insns_cnt %zu license off %d\n",
 		 prog_idx, prog_type, insns_off, insn_cnt, license_off);
 
 	/* convert blob insns to target endianness */
@@ -1105,21 +1105,21 @@ void bpf_gen__prog_load(struct bpf_gen *gen,
 	attr.func_info_rec_size = tgt_endian(load_attr->func_info_rec_size);
 	attr.func_info_cnt = tgt_endian(load_attr->func_info_cnt);
 	func_info = add_data(gen, load_attr->func_info, func_info_tot_sz);
-	pr_debug("gen: prog_load: func_info: off %d cnt %d rec size %d\n",
+	pr_debug("gen: prog_load: func_info: off %d cnt %u rec size %u\n",
 		 func_info, load_attr->func_info_cnt,
 		 load_attr->func_info_rec_size);
 
 	attr.line_info_rec_size = tgt_endian(load_attr->line_info_rec_size);
 	attr.line_info_cnt = tgt_endian(load_attr->line_info_cnt);
 	line_info = add_data(gen, load_attr->line_info, line_info_tot_sz);
-	pr_debug("gen: prog_load: line_info: off %d cnt %d rec size %d\n",
+	pr_debug("gen: prog_load: line_info: off %d cnt %u rec size %u\n",
 		 line_info, load_attr->line_info_cnt,
 		 load_attr->line_info_rec_size);
 
 	attr.core_relo_rec_size = tgt_endian((__u32)sizeof(struct bpf_core_relo));
 	attr.core_relo_cnt = tgt_endian(gen->core_relo_cnt);
 	core_relos = add_data(gen, gen->core_relos, core_relo_tot_sz);
-	pr_debug("gen: prog_load: core_relos: off %d cnt %d rec size %zd\n",
+	pr_debug("gen: prog_load: core_relos: off %d cnt %d rec size %zu\n",
 		 core_relos, gen->core_relo_cnt,
 		 sizeof(struct bpf_core_relo));
 
@@ -1234,7 +1234,7 @@ void bpf_gen__map_update_elem(struct bpf_gen *gen, int map_idx, void *pvalue,
 	}
 
 	map_update_attr = add_data(gen, &attr, attr_size);
-	pr_debug("gen: map_update_elem: idx %d, value: off %d size %d, attr: off %d size %d\n",
+	pr_debug("gen: map_update_elem: idx %d, value: off %d size %u, attr: off %d size %d\n",
 		 map_idx, value, value_size, map_update_attr, attr_size);
 	move_blob2blob(gen, attr_field(map_update_attr, map_fd), 4,
 		       blob_fd_array_off(gen, map_idx));
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 1368752aa13c39..7162146280a80e 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -1486,7 +1486,7 @@ static int init_struct_ops_maps(struct bpf_object *obj, const char *sec_name,
 		       type->size);
 		st_ops->type_id = type_id;
 
-		pr_debug("struct_ops init: struct %s(type_id=%u) %s found at offset %u\n",
+		pr_debug("struct_ops init: struct %s(type_id=%d) %s found at offset %u\n",
 			 tname, type_id, var_name, vsi->offset);
 	}
 
@@ -2626,7 +2626,7 @@ int parse_btf_map_def(const char *map_name, struct btf *btf,
 
 			t = btf__type_by_id(btf, m->type);
 			if (!t) {
-				pr_warn("map '%s': key type [%d] not found.\n",
+				pr_warn("map '%s': key type [%u] not found.\n",
 					map_name, m->type);
 				return -EINVAL;
 			}
@@ -2666,7 +2666,7 @@ int parse_btf_map_def(const char *map_name, struct btf *btf,
 
 			t = btf__type_by_id(btf, m->type);
 			if (!t) {
-				pr_warn("map '%s': value type [%d] not found.\n",
+				pr_warn("map '%s': value type [%u] not found.\n",
 					map_name, m->type);
 				return -EINVAL;
 			}
@@ -2720,7 +2720,7 @@ int parse_btf_map_def(const char *map_name, struct btf *btf,
 			map_def->value_size = 4;
 			t = btf__type_by_id(btf, m->type);
 			if (!t) {
-				pr_warn("map '%s': %s type [%d] not found.\n",
+				pr_warn("map '%s': %s type [%u] not found.\n",
 					map_name, desc, m->type);
 				return -EINVAL;
 			}
@@ -3476,7 +3476,7 @@ static int btf_fixup_datasec(struct bpf_object *obj, struct btf *btf,
 
 		var_name = btf__name_by_offset(btf, t_var->name_off);
 		if (!var_name) {
-			pr_debug("sec '%s': failed to find name of DATASEC's member #%d\n",
+			pr_debug("sec '%s': failed to find name of DATASEC's member #%u\n",
 				 sec_name, i);
 			return -ENOENT;
 		}
@@ -3971,7 +3971,7 @@ static int bpf_object__elf_collect(struct bpf_object *obj)
 		if (!data)
 			return -LIBBPF_ERRNO__FORMAT;
 
-		pr_debug("elf: section(%d) %s, size %ld, link %d, flags %lx, type=%d\n",
+		pr_debug("elf: section(%d) %s, size %lu, link %d, flags %lx, type=%d\n",
 			 idx, name, (unsigned long)data->d_size,
 			 (int)sh->sh_link, (unsigned long)sh->sh_flags,
 			 (int)sh->sh_type);
@@ -4494,7 +4494,7 @@ static int bpf_object__collect_externs(struct bpf_object *obj)
 
 			ext->kcfg.data_off = roundup(off, ext->kcfg.align);
 			off = ext->kcfg.data_off + ext->kcfg.sz;
-			pr_debug("extern (kcfg) #%d: symbol %d, off %u, name %s\n",
+			pr_debug("extern (kcfg) #%d: symbol %d, off %d, name %s\n",
 				 i, ext->sym_idx, ext->kcfg.data_off, ext->name);
 		}
 		sec->size = off;
@@ -4626,7 +4626,7 @@ static int bpf_program__record_reloc(struct bpf_program *prog,
 	struct bpf_map *map;
 
 	if (!is_call_insn(insn) && !is_ldimm64_insn(insn)) {
-		pr_warn("prog '%s': invalid relo against '%s' for insns[%d].code 0x%x\n",
+		pr_warn("prog '%s': invalid relo against '%s' for insns[%u].code 0x%x\n",
 			prog->name, sym_name, insn_idx, insn->code);
 		return -LIBBPF_ERRNO__RELOC;
 	}
@@ -4749,7 +4749,7 @@ static int bpf_program__record_reloc(struct bpf_program *prog,
 			    map->sec_idx != sym->st_shndx ||
 			    map->sec_offset != sym->st_value)
 				continue;
-			pr_debug("prog '%s': found map %zd (%s, sec %d, off %zu) for insn #%u\n",
+			pr_debug("prog '%s': found map %zu (%s, sec %d, off %zu) for insn #%u\n",
 				 prog->name, map_idx, map->name, map->sec_idx,
 				 map->sec_offset, insn_idx);
 			break;
@@ -4776,7 +4776,7 @@ static int bpf_program__record_reloc(struct bpf_program *prog,
 		map = &obj->maps[map_idx];
 		if (map->libbpf_type != type || map->sec_idx != sym->st_shndx)
 			continue;
-		pr_debug("prog '%s': found data map %zd (%s, sec %d, off %zu) for insn %u\n",
+		pr_debug("prog '%s': found data map %zu (%s, sec %d, off %zu) for insn %u\n",
 			 prog->name, map_idx, map->name, map->sec_idx,
 			 map->sec_offset, insn_idx);
 		break;
@@ -4985,7 +4985,7 @@ static int bpf_get_map_info_from_fdinfo(int fd, struct bpf_map_info *info)
 			info->value_size = val;
 		else if (sscanf(buff, "max_entries:\t%u", &val) == 1)
 			info->max_entries = val;
-		else if (sscanf(buff, "map_flags:\t%i", &val) == 1)
+		else if (sscanf(buff, "map_flags:\t%x", &val) == 1)
 			info->map_flags = val;
 	}
 
@@ -5521,11 +5521,11 @@ static int init_map_in_map_slots(struct bpf_object *obj, struct bpf_map *map)
 		}
 		if (err) {
 			err = -errno;
-			pr_warn("map '%s': failed to initialize slot [%d] to map '%s' fd=%d: %s\n",
+			pr_warn("map '%s': failed to initialize slot [%u] to map '%s' fd=%d: %s\n",
 				map->name, i, targ_map->name, fd, errstr(err));
 			return err;
 		}
-		pr_debug("map '%s': slot [%d] set to map '%s' fd=%d\n",
+		pr_debug("map '%s': slot [%u] set to map '%s' fd=%d\n",
 			 map->name, i, targ_map->name, fd);
 	}
 
@@ -5554,11 +5554,11 @@ static int init_prog_array_slots(struct bpf_object *obj, struct bpf_map *map)
 		err = bpf_map_update_elem(map->fd, &i, &fd, 0);
 		if (err) {
 			err = -errno;
-			pr_warn("map '%s': failed to initialize slot [%d] to prog '%s' fd=%d: %s\n",
+			pr_warn("map '%s': failed to initialize slot [%u] to prog '%s' fd=%d: %s\n",
 				map->name, i, targ_prog->name, fd, errstr(err));
 			return err;
 		}
-		pr_debug("map '%s': slot [%d] set to prog '%s' fd=%d\n",
+		pr_debug("map '%s': slot [%u] set to prog '%s' fd=%d\n",
 			 map->name, i, targ_prog->name, fd);
 	}
 
@@ -5788,7 +5788,7 @@ int bpf_core_add_cands(struct bpf_core_cand *local_cand,
 		if (strncmp(local_name, targ_name, local_essent_len) != 0)
 			continue;
 
-		pr_debug("CO-RE relocating [%d] %s %s: found target candidate [%d] %s %s in [%s]\n",
+		pr_debug("CO-RE relocating [%u] %s %s: found target candidate [%d] %s %s in [%s]\n",
 			 local_cand->id, btf_kind_str(local_t),
 			 local_name, i, btf_kind_str(t), targ_name,
 			 targ_btf_name);
@@ -5848,7 +5848,7 @@ static int load_module_btfs(struct bpf_object *obj)
 			if (errno == ENOENT)
 				continue; /* expected race: BTF was unloaded */
 			err = -errno;
-			pr_warn("failed to get BTF object #%d FD: %s\n", id, errstr(err));
+			pr_warn("failed to get BTF object #%u FD: %s\n", id, errstr(err));
 			return err;
 		}
 
@@ -5861,7 +5861,7 @@ static int load_module_btfs(struct bpf_object *obj)
 		err = bpf_btf_get_info_by_fd(fd, &info, &len);
 		if (err) {
 			err = -errno;
-			pr_warn("failed to get BTF object #%d info: %s\n", id, errstr(err));
+			pr_warn("failed to get BTF object #%u info: %s\n", id, errstr(err));
 			break;
 		}
 
@@ -5874,7 +5874,7 @@ static int load_module_btfs(struct bpf_object *obj)
 		btf = btf_get_from_fd(fd, obj->btf_vmlinux);
 		err = libbpf_get_error(btf);
 		if (err) {
-			pr_warn("failed to load module [%s]'s BTF object #%d: %s\n",
+			pr_warn("failed to load module [%s]'s BTF object #%u: %s\n",
 				name, id, errstr(err));
 			break;
 		}
@@ -6067,7 +6067,7 @@ static int bpf_core_resolve_relo(struct bpf_program *prog,
 	    !hashmap__find(cand_cache, local_id, &cands)) {
 		cands = bpf_core_find_cands(prog->obj, local_btf, local_id);
 		if (IS_ERR(cands)) {
-			pr_warn("prog '%s': relo #%d: target candidate search failed for [%d] %s %s: %ld\n",
+			pr_warn("prog '%s': relo #%d: target candidate search failed for [%u] %s %s: %ld\n",
 				prog_name, relo_idx, local_id, btf_kind_str(local_type),
 				local_name, PTR_ERR(cands));
 			return PTR_ERR(cands);
@@ -6127,7 +6127,7 @@ bpf_object__relocate_core(struct bpf_object *obj, const char *targ_btf_path)
 			goto out;
 		}
 
-		pr_debug("sec '%s': found %d CO-RE relocations\n", sec_name, sec->num_info);
+		pr_debug("sec '%s': found %u CO-RE relocations\n", sec_name, sec->num_info);
 
 		for_each_btf_ext_rec(seg, sec, i, rec) {
 			if (rec->insn_off % BPF_INSN_SZ)
@@ -6181,7 +6181,7 @@ bpf_object__relocate_core(struct bpf_object *obj, const char *targ_btf_path)
 
 			err = bpf_core_patch_insn(prog->name, insn, insn_idx, rec, i, &targ_res);
 			if (err) {
-				pr_warn("prog '%s': relo #%d: failed to patch insn #%u: %s\n",
+				pr_warn("prog '%s': relo #%d: failed to patch insn #%d: %s\n",
 					prog->name, i, insn_idx, errstr(err));
 				goto out;
 			}
@@ -6346,7 +6346,7 @@ static int create_jt_map(struct bpf_object *obj, struct bpf_program *prog, struc
 		goto err_close;
 	}
 	if (sym_off + jt_size > obj->jumptables_data_sz) {
-		pr_warn("map '.jumptables': jumptables_data size is %zd, trying to access %d\n",
+		pr_warn("map '.jumptables': jumptables_data size is %zu, trying to access %u\n",
 			obj->jumptables_data_sz, sym_off + jt_size);
 		err = -EINVAL;
 		goto err_close;
@@ -6381,7 +6381,7 @@ static int create_jt_map(struct bpf_object *obj, struct bpf_program *prog, struc
 		 */
 		if (insn_off > UINT32_MAX) {
 			pr_warn("map '.jumptables': invalid jump table value 0x%llx at offset %u\n",
-				(long long)jt[i], sym_off + i * jt_entry_size);
+				(unsigned long long)jt[i], sym_off + i * jt_entry_size);
 			err = -EINVAL;
 			goto err_close;
 		}
@@ -6517,7 +6517,7 @@ bpf_object__relocate_data(struct bpf_object *obj, struct bpf_program *prog)
 		}
 			break;
 		default:
-			pr_warn("prog '%s': relo #%d: bad relo type %d\n",
+			pr_warn("prog '%s': relo #%d: bad relo type %u\n",
 				prog->name, i, relo->type);
 			return -EINVAL;
 		}
@@ -6797,7 +6797,7 @@ bpf_object__reloc_code(struct bpf_object *obj, struct bpf_program *main_prog,
 			 */
 			continue;
 		if (relo && relo->type != RELO_CALL && relo->type != RELO_SUBPROG_ADDR) {
-			pr_warn("prog '%s': unexpected relo for insn #%zu, type %d\n",
+			pr_warn("prog '%s': unexpected relo for insn #%zu, type %u\n",
 				prog->name, insn_idx, relo->type);
 			return -LIBBPF_ERRNO__RELOC;
 		}
@@ -7587,7 +7587,7 @@ static int bpf_object__collect_map_relos(struct bpf_object *obj,
 		}
 		name = elf_sym_str(obj, sym->st_name) ?: "<?>";
 
-		pr_debug(".maps relo #%d: for %zd value %zd rel->r_offset %zu name %d ('%s')\n",
+		pr_debug(".maps relo #%d: for %zd value %zu rel->r_offset %zu name %u ('%s')\n",
 			 i, (ssize_t)(rel->r_info >> 32), (size_t)sym->st_value,
 			 (size_t)rel->r_offset, sym->st_name, name);
 
@@ -7678,7 +7678,7 @@ static int bpf_object__collect_map_relos(struct bpf_object *obj,
 		}
 		map->init_slots[moff] = is_map_in_map ? (void *)targ_map : (void *)targ_prog;
 
-		pr_debug(".maps relo #%d: map '%s' slot [%d] points to %s '%s'\n",
+		pr_debug(".maps relo #%d: map '%s' slot [%u] points to %s '%s'\n",
 			 i, map->name, moff, type, name);
 	}
 
@@ -8738,7 +8738,7 @@ static int bpf_object__resolve_ksym_var_btf_id(struct bpf_object *obj,
 		local_name = btf__name_by_offset(obj->btf, local_type->name_off);
 		targ_name = btf__name_by_offset(btf, targ_type->name_off);
 
-		pr_warn("extern (var ksym) '%s': incompatible types, expected [%d] %s %s, but kernel has [%d] %s %s\n",
+		pr_warn("extern (var ksym) '%s': incompatible types, expected [%u] %s %s, but kernel has [%u] %s %s\n",
 			ext->name, local_type_id,
 			btf_kind_str(local_type), local_name, targ_type_id,
 			btf_kind_str(targ_type), targ_name);
@@ -8915,7 +8915,7 @@ static int bpf_object__resolve_externs(struct bpf_object *obj,
 			if (err)
 				return err;
 			pr_debug("extern (kcfg) '%s': set to 0x%llx\n",
-				 ext->name, (long long)value);
+				 ext->name, (unsigned long long)value);
 		} else {
 			pr_warn("extern '%s': unrecognized extern kind\n", ext->name);
 			return -EINVAL;
@@ -10494,7 +10494,7 @@ static int bpf_object__collect_st_ops_relos(struct bpf_object *obj,
 		moff = rel->r_offset - map->sec_offset;
 		shdr_idx = sym->st_shndx;
 		st_ops = map->st_ops;
-		pr_debug("struct_ops reloc %s: for %lld value %lld shdr_idx %u rel->r_offset %zu map->sec_offset %zu name %d (\'%s\')\n",
+		pr_debug("struct_ops reloc %s: for %lld value %lld shdr_idx %u rel->r_offset %zu map->sec_offset %zu name %u (\'%s\')\n",
 			 map->name,
 			 (long long)(rel->r_info >> 32),
 			 (long long)sym->st_value,
@@ -10643,7 +10643,7 @@ static int libbpf_find_prog_btf_id(const char *name, __u32 attach_prog_fd, int t
 	memset(&info, 0, info_len);
 	err = bpf_prog_get_info_by_fd(attach_prog_fd, &info, &info_len);
 	if (err) {
-		pr_warn("failed bpf_prog_get_info_by_fd for FD %d: %s\n",
+		pr_warn("failed bpf_prog_get_info_by_fd for FD %u: %s\n",
 			attach_prog_fd, errstr(err));
 		return err;
 	}
@@ -10656,7 +10656,7 @@ static int libbpf_find_prog_btf_id(const char *name, __u32 attach_prog_fd, int t
 	btf = btf_load_from_kernel(info.btf_id, NULL, token_fd);
 	err = libbpf_get_error(btf);
 	if (err) {
-		pr_warn("Failed to get BTF %d of the program: %s\n", info.btf_id, errstr(err));
+		pr_warn("Failed to get BTF %u of the program: %s\n", info.btf_id, errstr(err));
 		goto out;
 	}
 	err = btf__find_by_name_kind(btf, name, BTF_KIND_FUNC);
@@ -10738,7 +10738,7 @@ static int libbpf_find_attach_btf_id(struct bpf_program *prog, const char *attac
 		}
 		err = libbpf_find_prog_btf_id(attach_name, attach_prog_fd, prog->obj->token_fd);
 		if (err < 0) {
-			pr_warn("prog '%s': failed to find BPF program (FD %d) BTF ID for '%s': %s\n",
+			pr_warn("prog '%s': failed to find BPF program (FD %u) BTF ID for '%s': %s\n",
 				prog->name, attach_prog_fd, attach_name, errstr(err));
 			return err;
 		}
@@ -11233,7 +11233,7 @@ static int validate_map_op(const struct bpf_map *map, size_t key_sz,
 		}
 
 		if (value_sz != num_cpu * elem_sz) {
-			pr_warn("map '%s': unexpected value size %zu provided for per-CPU map, expected %d * %zu = %zd\n",
+			pr_warn("map '%s': unexpected value size %zu provided for per-CPU map, expected %d * %zu = %zu\n",
 				map->name, value_sz, num_cpu, elem_sz, num_cpu * elem_sz);
 			return -EINVAL;
 		}
@@ -11774,7 +11774,7 @@ static void gen_probe_legacy_event_name(char *buf, size_t buf_sz,
 	static int index = 0;
 	int i;
 
-	snprintf(buf, buf_sz, "libbpf_%u_%d_%s_0x%zx", getpid(),
+	snprintf(buf, buf_sz, "libbpf_%d_%d_%s_0x%zx", getpid(),
 		 __sync_fetch_and_add(&index, 1), name, offset);
 
 	/* sanitize name in the probe name */
@@ -12924,8 +12924,8 @@ static long elf_find_func_offset_from_archive(const char *archive_path, const ch
 	ret = elf_find_func_offset(elf, file_name, func_name);
 	if (ret > 0) {
 		pr_debug("elf: symbol address match for %s of %s in %s: 0x%x + 0x%lx = 0x%lx\n",
-			 func_name, file_name, archive_path, entry.data_offset, ret,
-			 ret + entry.data_offset);
+			 func_name, file_name, archive_path, entry.data_offset, (unsigned long)ret,
+			 (unsigned long)(ret + entry.data_offset));
 		ret += entry.data_offset;
 	}
 	elf_end(elf);
@@ -14570,7 +14570,7 @@ perf_buffer__process_record(struct perf_event_header *e, void *ctx)
 		break;
 	}
 	default:
-		pr_warn("unknown perf sample type %d\n", e->type);
+		pr_warn("unknown perf sample type %u\n", e->type);
 		return LIBBPF_PERF_EVENT_ERROR;
 	}
 	return LIBBPF_PERF_EVENT_CONT;
diff --git a/tools/lib/bpf/nlattr.c b/tools/lib/bpf/nlattr.c
index 06663f9ea581f9..007fe17d17b429 100644
--- a/tools/lib/bpf/nlattr.c
+++ b/tools/lib/bpf/nlattr.c
@@ -123,7 +123,7 @@ int libbpf_nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head,
 
 		if (tb[type]) {
 			pr_warn("Attribute of type %#x found multiple times in message, "
-				"previous attribute is being ignored.\n", type);
+				"previous attribute is being ignored.\n", (unsigned)type);
 		}
 
 		tb[type] = nla;
diff --git a/tools/lib/bpf/relo_core.c b/tools/lib/bpf/relo_core.c
index 6ae3f2a15ad0cf..8ad2715721cfd3 100644
--- a/tools/lib/bpf/relo_core.c
+++ b/tools/lib/bpf/relo_core.c
@@ -216,7 +216,7 @@ int __bpf_core_types_are_compat(const struct btf *local_btf, __u32 local_id,
 		goto recur;
 	}
 	default:
-		pr_warn("unexpected kind %s relocated, local [%d], target [%d]\n",
+		pr_warn("unexpected kind %s relocated, local [%u], target [%u]\n",
 			btf_kind_str(local_type), local_id, targ_id);
 		return 0;
 	}
@@ -384,7 +384,7 @@ int bpf_core_parse_spec(const char *prog_name, const struct btf *btf,
 				return sz;
 			spec->bit_offset += access_idx * sz * 8;
 		} else {
-			pr_warn("prog '%s': relo for [%u] %s (at idx %d) captures type [%d] of unexpected kind %s\n",
+			pr_warn("prog '%s': relo for [%u] %s (at idx %d) captures type [%u] of unexpected kind %s\n",
 				prog_name, relo->type_id, spec_str, i, id, btf_kind_str(t));
 			return -EINVAL;
 		}
@@ -725,7 +725,7 @@ static int bpf_core_calc_field_relo(const char *prog_name,
 				return -EINVAL;
 			*val = sz;
 		} else {
-			pr_warn("prog '%s': relo %d at insn #%d can't be applied to array access\n",
+			pr_warn("prog '%s': relo %u at insn #%u can't be applied to array access\n",
 				prog_name, relo->kind, relo->insn_off / 8);
 			return -EINVAL;
 		}
@@ -747,7 +747,7 @@ static int bpf_core_calc_field_relo(const char *prog_name,
 		while (bit_off + bit_sz - byte_off * 8 > byte_sz * 8) {
 			if (byte_sz >= 8) {
 				/* bitfield can't be read with 64-bit read */
-				pr_warn("prog '%s': relo %d at insn #%d can't be satisfied for bitfield\n",
+				pr_warn("prog '%s': relo %u at insn #%u can't be satisfied for bitfield\n",
 					prog_name, relo->kind, relo->insn_off / 8);
 				return -E2BIG;
 			}
@@ -971,7 +971,7 @@ static int bpf_core_calc_relo(const char *prog_name,
 		err = 0;
 	} else if (err == -EOPNOTSUPP) {
 		/* EOPNOTSUPP means unknown/unsupported relocation */
-		pr_warn("prog '%s': relo #%d: unrecognized CO-RE relocation %s (%d) at insn #%d\n",
+		pr_warn("prog '%s': relo #%d: unrecognized CO-RE relocation %s (%u) at insn #%u\n",
 			prog_name, relo_idx, core_relo_kind_str(relo->kind),
 			relo->kind, relo->insn_off / 8);
 	}
@@ -1067,7 +1067,7 @@ int bpf_core_patch_insn(const char *prog_name, struct bpf_insn *insn,
 		if (BPF_SRC(insn->code) != BPF_K)
 			return -EINVAL;
 		if (res->validate && insn->imm != orig_val) {
-			pr_warn("prog '%s': relo #%d: unexpected insn #%d (ALU/ALU64) value: got %u, exp %llu -> %llu\n",
+			pr_warn("prog '%s': relo #%d: unexpected insn #%d (ALU/ALU64) value: got %d, exp %llu -> %llu\n",
 				prog_name, relo_idx,
 				insn_idx, insn->imm, (unsigned long long)orig_val,
 				(unsigned long long)new_val);
@@ -1083,7 +1083,7 @@ int bpf_core_patch_insn(const char *prog_name, struct bpf_insn *insn,
 	case BPF_ST:
 	case BPF_STX:
 		if (res->validate && insn->off != orig_val) {
-			pr_warn("prog '%s': relo #%d: unexpected insn #%d (LDX/ST/STX) value: got %u, exp %llu -> %llu\n",
+			pr_warn("prog '%s': relo #%d: unexpected insn #%d (LDX/ST/STX) value: got %d, exp %llu -> %llu\n",
 				prog_name, relo_idx, insn_idx, insn->off, (unsigned long long)orig_val,
 				(unsigned long long)new_val);
 			return -EINVAL;
@@ -1159,7 +1159,7 @@ int bpf_core_patch_insn(const char *prog_name, struct bpf_insn *insn,
 	default:
 		pr_warn("prog '%s': relo #%d: trying to relocate unrecognized insn #%d, code:0x%x, src:0x%x, dst:0x%x, off:0x%x, imm:0x%x\n",
 			prog_name, relo_idx, insn_idx, insn->code,
-			insn->src_reg, insn->dst_reg, insn->off, insn->imm);
+			(unsigned)insn->src_reg, (unsigned)insn->dst_reg, (unsigned)insn->off, (unsigned)insn->imm);
 		return -EINVAL;
 	}
 
@@ -1323,7 +1323,7 @@ int bpf_core_calc_relo_insn(const char *prog_name,
 		const char *spec_str;
 
 		spec_str = btf__name_by_offset(local_btf, relo->access_str_off);
-		pr_warn("prog '%s': relo #%d: parsing [%d] %s %s + %s failed: %d\n",
+		pr_warn("prog '%s': relo #%d: parsing [%u] %s %s + %s failed: %d\n",
 			prog_name, relo_idx, local_id, btf_kind_str(local_type),
 			str_is_empty(local_name) ? "<anon>" : local_name,
 			spec_str ?: "<?>", err);
@@ -1346,7 +1346,7 @@ int bpf_core_calc_relo_insn(const char *prog_name,
 
 	/* libbpf doesn't support candidate search for anonymous types */
 	if (str_is_empty(local_name)) {
-		pr_warn("prog '%s': relo #%d: <%s> (%d) relocation doesn't support anonymous types\n",
+		pr_warn("prog '%s': relo #%d: <%s> (%u) relocation doesn't support anonymous types\n",
 			prog_name, relo_idx, core_relo_kind_str(relo->kind), relo->kind);
 		return -EOPNOTSUPP;
 	}
@@ -1697,7 +1697,7 @@ int __bpf_core_types_match(const struct btf *local_btf, __u32 local_id, const st
 		goto recur;
 	}
 	default:
-		pr_warn("unexpected kind %s relocated, local [%d], target [%d]\n",
+		pr_warn("unexpected kind %s relocated, local [%u], target [%u]\n",
 			btf_kind_str(local_t), local_id, targ_id);
 		return 0;
 	}
diff --git a/tools/lib/bpf/usdt.c b/tools/lib/bpf/usdt.c
index 57fb82bb81b588..db9432adb967b6 100644
--- a/tools/lib/bpf/usdt.c
+++ b/tools/lib/bpf/usdt.c
@@ -327,7 +327,7 @@ static int sanity_check_usdt_elf(Elf *elf, const char *path)
 	int endianness;
 
 	if (elf_kind(elf) != ELF_K_ELF) {
-		pr_warn("usdt: unrecognized ELF kind %d for '%s'\n", elf_kind(elf), path);
+		pr_warn("usdt: unrecognized ELF kind %u for '%s'\n", elf_kind(elf), path);
 		return -EBADF;
 	}
 
@@ -438,8 +438,9 @@ static int parse_elf_segs(Elf *elf, const char *path, struct elf_seg **segs, siz
 		}
 
 		pr_debug("usdt: discovered PHDR #%d in '%s': vaddr 0x%lx memsz 0x%lx offset 0x%lx type 0x%lx flags 0x%lx\n",
-			 i, path, (long)phdr.p_vaddr, (long)phdr.p_memsz, (long)phdr.p_offset,
-			 (long)phdr.p_type, (long)phdr.p_flags);
+			 i, path,
+			 (unsigned long)phdr.p_vaddr, (unsigned long)phdr.p_memsz, (unsigned long)phdr.p_offset,
+			 (unsigned long)phdr.p_type, (unsigned long)phdr.p_flags);
 		if (phdr.p_type != PT_LOAD)
 			continue;
 
@@ -719,14 +720,14 @@ static int collect_usdt_targets(struct usdt_manager *man, struct elf_fd *elf_fd,
 		if (!seg) {
 			err = -ESRCH;
 			pr_warn("usdt: failed to find ELF program segment for '%s:%s' in '%s' at IP 0x%lx\n",
-				usdt_provider, usdt_name, path, usdt_abs_ip);
+				usdt_provider, usdt_name, path, (unsigned long)usdt_abs_ip);
 			goto err_out;
 		}
 		if (!seg->is_exec) {
 			err = -ESRCH;
 			pr_warn("usdt: matched ELF binary '%s' segment [0x%lx, 0x%lx) for '%s:%s' at IP 0x%lx is not executable\n",
-				path, seg->start, seg->end, usdt_provider, usdt_name,
-				usdt_abs_ip);
+				path, (unsigned long)seg->start, (unsigned long)seg->end, usdt_provider, usdt_name,
+				(unsigned long)usdt_abs_ip);
 			goto err_out;
 		}
 		/* translate from virtual address to file offset */
@@ -766,7 +767,7 @@ static int collect_usdt_targets(struct usdt_manager *man, struct elf_fd *elf_fd,
 			if (!seg) {
 				err = -ESRCH;
 				pr_warn("usdt: failed to find shared lib memory segment for '%s:%s' in '%s' at relative IP 0x%lx\n",
-					usdt_provider, usdt_name, path, usdt_rel_ip);
+					usdt_provider, usdt_name, path, (unsigned long)usdt_rel_ip);
 				goto err_out;
 			}
 
@@ -775,8 +776,10 @@ static int collect_usdt_targets(struct usdt_manager *man, struct elf_fd *elf_fd,
 
 		pr_debug("usdt: probe for '%s:%s' in %s '%s': addr 0x%lx base 0x%lx (resolved abs_ip 0x%lx rel_ip 0x%lx) args '%s' in segment [0x%lx, 0x%lx) at offset 0x%lx\n",
 			 usdt_provider, usdt_name, ehdr.e_type == ET_EXEC ? "exec" : "lib ", path,
-			 note.loc_addr, note.base_addr, usdt_abs_ip, usdt_rel_ip, note.args,
-			 seg ? seg->start : 0, seg ? seg->end : 0, seg ? seg->offset : 0);
+			 (unsigned long)note.loc_addr, (unsigned long)note.base_addr,
+			 (unsigned long)usdt_abs_ip, (unsigned long)usdt_rel_ip, note.args,
+			 (unsigned long)(seg ? seg->start : 0), (unsigned long)(seg ? seg->end : 0),
+			 (unsigned long)(seg ? seg->offset : 0));
 
 		/* Adjust semaphore address to be a file offset */
 		if (note.sema_addr) {
@@ -791,14 +794,14 @@ static int collect_usdt_targets(struct usdt_manager *man, struct elf_fd *elf_fd,
 			if (!seg) {
 				err = -ESRCH;
 				pr_warn("usdt: failed to find ELF loadable segment with semaphore of '%s:%s' in '%s' at 0x%lx\n",
-					usdt_provider, usdt_name, path, note.sema_addr);
+					usdt_provider, usdt_name, path, (unsigned long)note.sema_addr);
 				goto err_out;
 			}
 			if (seg->is_exec) {
 				err = -ESRCH;
 				pr_warn("usdt: matched ELF binary '%s' segment [0x%lx, 0x%lx] for semaphore of '%s:%s' at 0x%lx is executable\n",
-					path, seg->start, seg->end, usdt_provider, usdt_name,
-					note.sema_addr);
+					path, (unsigned long)seg->start, (unsigned long)seg->end, usdt_provider, usdt_name,
+					(unsigned long)note.sema_addr);
 				goto err_out;
 			}
 
@@ -806,8 +809,8 @@ static int collect_usdt_targets(struct usdt_manager *man, struct elf_fd *elf_fd,
 
 			pr_debug("usdt: sema  for '%s:%s' in %s '%s': addr 0x%lx base 0x%lx (resolved 0x%lx) in segment [0x%lx, 0x%lx] at offset 0x%lx\n",
 				 usdt_provider, usdt_name, ehdr.e_type == ET_EXEC ? "exec" : "lib ",
-				 path, note.sema_addr, note.base_addr, usdt_sema_off,
-				 seg->start, seg->end, seg->offset);
+				 path, (unsigned long)note.sema_addr, (unsigned long)note.base_addr, (unsigned long)usdt_sema_off,
+				 (unsigned long)seg->start, (unsigned long)seg->end, (unsigned long)seg->offset);
 		}
 
 		/* Record adjusted addresses and offsets and parse USDT spec */
@@ -1117,7 +1120,7 @@ struct bpf_link *usdt_manager_attach_usdt(struct usdt_manager *man, const struct
 				        spec_id, usdt_provider, usdt_name, path);
 			} else {
 				pr_warn("usdt: failed to map IP 0x%lx to spec #%d for '%s:%s' in '%s': %s\n",
-					target->abs_ip, spec_id, usdt_provider, usdt_name,
+					(unsigned long)target->abs_ip, spec_id, usdt_provider, usdt_name,
 					path, errstr(err));
 			}
 			goto err_out;

3/2 2026/06/26 10:56 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 16691
							output: 84
							thoughts: 2608
						

Thoughts:
**Analysis of the BPF Patch for Fuzzing Suitability**

Okay, so I've gone through this patch modifying the `tools/lib/bpf/` directory, and it looks like a straightforward cleanup effort. Primarily, it's about tweaking those `pr_warn` and `pr_debug` calls, changing format specifiers – things like `%d` to `%u`, `%zd` to `%zu`, and adding casts, mostly `(unsigned long)`. This is all pretty cosmetic, right? It doesn't seem like the actual *logic* of the BPF code or kernel interactions is being changed.

I went line-by-line in the diff. Double checked everything in `btf.c`, `btf_dump.c`, `btf_relocate.c`, `elf.c`, `gen_loader.c`, `libbpf.c`, `nlattr.c`, `relo_core.c`, and `usdt.c`. Everything is really just about formatting the output of warnings and debug messages, making sure the right data types are being printed correctly. I was a little worried about the `sscanf` change in `libbpf.c`, but it turns out the original code with `%i` was already parsing the hex values used for map flags from `fdinfo` correctly. While a change, it wasn't a functional one in terms of altering the behavior.

And, of course, this is all happening in user-space tools, which are very different from fuzzing the kernel itself. Syzkaller, which is mentioned in the instructions, is designed to fuzz kernel code, and it's not the right tool for user-space changes. It's a completely different level of testing.

So, from what I can see, this patch doesn't introduce any kernel-level functional changes or new vulnerabilities that would warrant kernel fuzzing. It's really just a formatting cleanup in the user-space BPF tools. Therefore, based on my analysis, I'm confident in concluding that this patch is `WorthFuzzing=false`.



4/2 2026/06/26 10:56 tool set-results
0m Args:
{
  "EnableConfigs": [],
  "FocusSymbols": [],
  "Reasoning": "The patch only modifies format specifiers in logging functions (pr_warn, pr_debug) and one sscanf call in user-space libbpf code (tools/lib/bpf/). It does not make any functional changes to the kernel execution flow.",
  "WorthFuzzing": false
}

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch only modifies format specifiers in logging functions (pr_warn, pr_debug) and one sscanf call in user-space libbpf code (tools/lib/bpf/). It does not make any functional changes to the kernel execution flow.",
  "WorthFuzzing": false
}

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)