kernel_samsung_a53x/kernel/bpf
Alan Maguire 1f672c7bc8 bpf: Eliminate remaining "make W=1" warnings in kernel/bpf/btf.o
[ Upstream commit 2454075f8e2915cebbe52a1195631bc7efe2b7e1 ]

As reported by Mirsad [1] we still see format warnings in kernel/bpf/btf.o
at W=1 warning level:

  CC      kernel/bpf/btf.o
./kernel/bpf/btf.c: In function ‘btf_type_seq_show_flags’:
./kernel/bpf/btf.c:7553:21: warning: assignment left-hand side might be a candidate for a format attribute [-Wsuggest-attribute=format]
 7553 |         sseq.showfn = btf_seq_show;
      |                     ^
./kernel/bpf/btf.c: In function ‘btf_type_snprintf_show’:
./kernel/bpf/btf.c:7604:31: warning: assignment left-hand side might be a candidate for a format attribute [-Wsuggest-attribute=format]
 7604 |         ssnprintf.show.showfn = btf_snprintf_show;
      |                               ^

Combined with CONFIG_WERROR=y these can halt the build.

The fix (annotating the structure field with __printf())
suggested by Mirsad resolves these. Apologies I missed this last time.
No other W=1 warnings were observed in kernel/bpf after this fix.

[1] https://lore.kernel.org/bpf/92c9d047-f058-400c-9c7d-81d4dc1ef71b@gmail.com/

Fixes: b3470da314fd ("bpf: annotate BTF show functions with __printf")
Reported-by: Mirsad Todorovac <mtodorovac69@gmail.com>
Suggested-by: Mirsad Todorovac <mtodorovac69@gmail.com>
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20240712092859.1390960-1-alan.maguire@oracle.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:20:08 +01:00
..
preload Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arraymap.c bpf: Add map and need_defer parameters to .map_fd_put_ptr() 2024-11-18 12:13:12 +01:00
bpf_inode_storage.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_iter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_local_storage.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_lru_list.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_lru_list.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_lsm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_struct_ops.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_struct_ops_types.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
btf.c bpf: Eliminate remaining "make W=1" warnings in kernel/bpf/btf.o 2024-11-23 23:20:08 +01:00
cgroup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.c bpf: Detect IP == ksym.end as part of BPF program 2024-11-18 11:43:12 +01:00
cpumap.c bpf: report RCU QS in cpumap kthread 2024-11-19 08:45:00 +01:00
devmap.c bpf: Fix DEVMAP_HASH overflow check on 32-bit arches 2024-11-19 08:44:48 +01:00
disasm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
disasm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dispatcher.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hashtab.c bpf: Fix hashtab overflow check on 32-bit arches 2024-11-19 08:44:48 +01:00
helpers.c bpf: Mark bpf_spin_{lock,unlock}() helpers with notrace correctly 2024-11-19 08:44:44 +01:00
inode.c Revert "fs: add file and path permissions helpers" 2024-11-19 13:30:21 +01:00
local_storage.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpm_trie.c bpf, lpm: Fix check prefixlen before walking trie 2024-11-18 12:12:28 +01:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
map_in_map.c bpf: Add map and need_defer parameters to .map_fd_put_ptr() 2024-11-18 12:13:12 +01:00
map_in_map.h bpf: Add map and need_defer parameters to .map_fd_put_ptr() 2024-11-18 12:13:12 +01:00
map_iter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net_namespace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
percpu_freelist.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
percpu_freelist.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
prog_iter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
queue_stack_maps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reuseport_array.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ringbuf.c bpf: Fix overrunning reservations in ringbuf 2024-11-19 14:19:51 +01:00
stackmap.c bpf: Fix stackmap overflow check on 32-bit arches 2024-11-19 08:44:49 +01:00
syscall.c bpf: In bpf_task_fd_query use fget_task 2024-11-19 12:27:27 +01:00
sysfs_btf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
task_iter.c file: Replace fcheck_files with files_lookup_fd_rcu 2024-11-19 12:27:27 +01:00
tnum.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trampoline.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
verifier.c bpf: Allow reads from uninit stack 2024-11-19 14:19:46 +01:00