BPF List
 help / color / mirror / Atom feed
* [PATCH v1] bpf: Add missing force_checksrc macro
@ 2024-08-28 15:25 Alexey Gladkov
  2024-08-28 16:32 ` Masahiro Yamada
  0 siblings, 1 reply; 12+ messages in thread
From: Alexey Gladkov @ 2024-08-28 15:25 UTC (permalink / raw)
  To: linux-kernel, bpf, linux-kbuild
  Cc: Masahiro Yamada, Alexei Starovoitov, Andrii Nakryiko,
	Daniel Borkmann, Oleg Nesterov

According to the documentation, when building a kernel with the C=2
parameter, all source files should be checked. But this does not happen
for the kernel/bpf/ directory.

$ touch kernel/bpf/core.o
$ make C=2 CHECK=true kernel/bpf/core.o

Outputs:

  CHECK   scripts/mod/empty.c
  CALL    scripts/checksyscalls.sh
  DESCEND objtool
  INSTALL libsubcmd_headers
  CC      kernel/bpf/core.o

As can be seen the compilation is done, but CHECK is not executed. This
happens because kernel/bpf/Makefile has defined its own rule for
compilation and forgotten the macro that does the check.

Signed-off-by: Alexey Gladkov <legion@kernel.org>
---
 kernel/bpf/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/bpf/Makefile b/kernel/bpf/Makefile
index 0291eef9ce92..f0ba6bf73bb6 100644
--- a/kernel/bpf/Makefile
+++ b/kernel/bpf/Makefile
@@ -58,3 +58,4 @@ vpath %.c $(srctree)/kernel/bpf:$(srctree)/tools/lib/bpf
 
 $(obj)/%.o: %.c FORCE
 	$(call if_changed_rule,cc_o_c)
+	$(call cmd,force_checksrc)
-- 
2.46.0


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

end of thread, other threads:[~2024-08-30 16:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-28 15:25 [PATCH v1] bpf: Add missing force_checksrc macro Alexey Gladkov
2024-08-28 16:32 ` Masahiro Yamada
2024-08-28 17:06   ` [PATCH v2] bpf: Remove custom build rule Alexey Gladkov
2024-08-28 17:22     ` Masahiro Yamada
2024-08-28 17:49       ` Alexey Gladkov
2024-08-28 18:10       ` [PATCH v3] " Alexey Gladkov
2024-08-28 18:32         ` Masahiro Yamada
2024-08-28 19:14         ` Oleg Nesterov
2024-08-29 10:12         ` Alan Maguire
2024-08-29 19:24         ` Alexei Starovoitov
2024-08-30  7:43           ` [PATCH v4] " Alexey Gladkov
2024-08-30 16:00             ` 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