linux-samsung-r9q2/include
Dave Marchevsky 391145ba2a bpf: Add __bpf_kfunc_{start,end}_defs macros
BPF kfuncs are meant to be called from BPF programs. Accordingly, most
kfuncs are not called from anywhere in the kernel, which the
-Wmissing-prototypes warning is unhappy about. We've peppered
__diag_ignore_all("-Wmissing-prototypes", ... everywhere kfuncs are
defined in the codebase to suppress this warning.

This patch adds two macros meant to bound one or many kfunc definitions.
All existing kfunc definitions which use these __diag calls to suppress
-Wmissing-prototypes are migrated to use the newly-introduced macros.
A new __diag_ignore_all - for "-Wmissing-declarations" - is added to the
__bpf_kfunc_start_defs macro based on feedback from Andrii on an earlier
version of this patch [0] and another recent mailing list thread [1].

In the future we might need to ignore different warnings or do other
kfunc-specific things. This change will make it easier to make such
modifications for all kfunc defs.

  [0]: https://lore.kernel.org/bpf/CAEf4BzaE5dRWtK6RPLnjTW-MW9sx9K3Fn6uwqCTChK2Dcb1Xig@mail.gmail.com/
  [1]: https://lore.kernel.org/bpf/ZT+2qCc%2FaXep0%2FLf@krava/

Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Cc: Jiri Olsa <olsajiri@gmail.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: David Vernet <void@manifault.com>
Acked-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://lore.kernel.org/r/20231031215625.2343848-1-davemarchevsky@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2023-11-01 22:33:53 -07:00
..
acpi Merge branch 'acpi-bus' 2023-10-26 15:04:49 +02:00
asm-generic asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
clocksource
crypto This update includes the following changes: 2023-08-29 11:23:29 -07:00
drm Merge tag 'drm-misc-next-2023-10-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-10-31 10:47:50 +10:00
dt-bindings SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
keys integrity: PowerVM support for loading third party code signing keys 2023-08-17 20:12:35 +00:00
kunit - An extensive rework of kexec and crash Kconfig from Eric DeVolder 2023-08-29 14:53:51 -07:00
kvm KVM: arm64: timers: Correctly handle TGE flip with CNTPOFF_EL2 2023-10-12 16:55:21 +01:00
linux bpf: Add __bpf_kfunc_{start,end}_defs macros 2023-11-01 22:33:53 -07:00
math-emu
media media updates for v6.6-rc1 2023-09-01 12:21:32 -07:00
memory
misc
net Follow up to networking PR for 6.7 2023-11-01 16:33:20 -10:00
pcmcia
ras
rdma RDMA Remove unused function declarations 2023-08-13 10:32:35 +03:00
rv rv: Set variable 'da_mon_##name' to static 2023-09-01 21:00:00 -04:00
scsi ATA changes for 6.7-rc1 2023-11-01 12:50:12 -10:00
soc SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
sound ASoC: soc-dapm: Add helper for comparing widget name 2023-10-09 13:03:28 +01:00
target
trace asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
uapi Follow up to networking PR for 6.7 2023-11-01 16:33:20 -10:00
ufs Merge branch 'fixes' into misc 2023-09-02 08:25:19 +01:00
vdso
video fbdev: stifb: Make the STI next font pointer a 32-bit signed offset 2023-10-30 14:54:41 +01:00
xen xen: privcmd: Add support for ioeventfd 2023-10-16 15:18:33 +02:00