[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2e31904051277ecff988530b50373d11efdcfaee.1744169424.git.dxu@dxuuu.xyz>
Date: Tue, 8 Apr 2025 21:34:08 -0600
From: Daniel Xu <dxu@...uu.xyz>
To: andrii@...nel.org,
ast@...nel.org,
daniel@...earbox.net
Cc: martin.lau@...ux.dev,
eddyz87@...il.com,
song@...nel.org,
yonghong.song@...ux.dev,
john.fastabend@...il.com,
kpsingh@...nel.org,
sdf@...ichev.me,
haoluo@...gle.com,
jolsa@...nel.org,
linux-kernel@...r.kernel.org,
bpf@...r.kernel.org
Subject: [RFC bpf-next 13/13] bpf: Supporting building verifier.ko out-of-tree
This supports out-of-tree builds against the in-tree verifier.ko. This
is intended to be used to build newer upstream verifiers against older
kernel sources.
You can also do an "in-tree out-of-tree" build as proof of concept:
$ make clean
$ make modules_prepare
$ cd kernel/bpf
$ make -C ../.. M=$PWD
Signed-off-by: Daniel Xu <dxu@...uu.xyz>
---
kernel/bpf/Kbuild | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100644 kernel/bpf/Kbuild
diff --git a/kernel/bpf/Kbuild b/kernel/bpf/Kbuild
new file mode 100644
index 000000000000..0b4a9ce14c6f
--- /dev/null
+++ b/kernel/bpf/Kbuild
@@ -0,0 +1,8 @@
+# Because Kbuild is preferred over Makefile for in-tree builds
+# but Kbuild is necessary for an out-of-tree module, we need an
+# explicit dispatch to Makefile if doing an in-tree build.
+ifneq ($(M),)
+ obj-m = verifier.o
+else
+ include $(src)/Makefile
+endif
--
2.47.1
Powered by blists - more mailing lists