]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bpf: Use hyphens in directory names instead of underscores 38203/head
authorDaanDeMeyer <daan.j.demeyer@gmail.com>
Sun, 13 Jul 2025 10:45:37 +0000 (12:45 +0200)
committerDaanDeMeyer <daan.j.demeyer@gmail.com>
Sun, 13 Jul 2025 10:45:37 +0000 (12:45 +0200)
27 files changed:
src/core/bpf-restrict-fs.c
src/core/bpf-restrict-ifaces.c
src/core/bpf-socket-bind.c
src/core/bpf/restrict-fs/meson.build [moved from src/core/bpf/restrict_fs/meson.build with 100% similarity]
src/core/bpf/restrict-fs/restrict-fs-skel.h [moved from src/core/bpf/restrict_fs/restrict-fs-skel.h with 93% similarity]
src/core/bpf/restrict-fs/restrict-fs.bpf.c [moved from src/core/bpf/restrict_fs/restrict-fs.bpf.c with 100% similarity]
src/core/bpf/restrict-ifaces/meson.build [moved from src/core/bpf/restrict_ifaces/meson.build with 100% similarity]
src/core/bpf/restrict-ifaces/restrict-ifaces-skel.h [moved from src/core/bpf/restrict_ifaces/restrict-ifaces-skel.h with 91% similarity]
src/core/bpf/restrict-ifaces/restrict-ifaces.bpf.c [moved from src/core/bpf/restrict_ifaces/restrict-ifaces.bpf.c with 100% similarity]
src/core/bpf/socket-bind/meson.build [moved from src/core/bpf/socket_bind/meson.build with 100% similarity]
src/core/bpf/socket-bind/socket-bind-api.bpf.h [moved from src/core/bpf/socket_bind/socket-bind-api.bpf.h with 100% similarity]
src/core/bpf/socket-bind/socket-bind-skel.h [moved from src/core/bpf/socket_bind/socket-bind-skel.h with 93% similarity]
src/core/bpf/socket-bind/socket-bind.bpf.c [moved from src/core/bpf/socket_bind/socket-bind.bpf.c with 100% similarity]
src/core/cgroup.c
src/core/meson.build
src/network/bpf/sysctl-monitor/meson.build [moved from src/network/bpf/sysctl_monitor/meson.build with 100% similarity]
src/network/bpf/sysctl-monitor/sysctl-monitor-skel.h [moved from src/network/bpf/sysctl_monitor/sysctl-monitor-skel.h with 92% similarity]
src/network/bpf/sysctl-monitor/sysctl-monitor.bpf.c [moved from src/network/bpf/sysctl_monitor/sysctl-monitor.bpf.c with 100% similarity]
src/network/bpf/sysctl-monitor/sysctl-write-event.h [moved from src/network/bpf/sysctl_monitor/sysctl-write-event.h with 100% similarity]
src/network/meson.build
src/network/networkd-sysctl.c
src/nsresourced/bpf/userns-restrict/meson.build [moved from src/nsresourced/bpf/userns_restrict/meson.build with 100% similarity]
src/nsresourced/bpf/userns-restrict/userns-restrict-skel.h [moved from src/nsresourced/bpf/userns_restrict/userns-restrict-skel.h with 92% similarity]
src/nsresourced/bpf/userns-restrict/userns-restrict.bpf.c [moved from src/nsresourced/bpf/userns_restrict/userns-restrict.bpf.c with 100% similarity]
src/nsresourced/meson.build
src/nsresourced/userns-restrict.h
src/shared/bpf-dlopen.h

index 33e525c911aaa79752e566fd95c6ac59251ae36e..859ba556a022203ed6282c6986c2126fb027e52d 100644 (file)
@@ -17,7 +17,7 @@
 /* libbpf, clang and llc compile time dependencies are satisfied */
 #include "bpf-dlopen.h"
 #include "bpf-link.h"
-#include "bpf/restrict_fs/restrict-fs-skel.h"
+#include "bpf/restrict-fs/restrict-fs-skel.h"
 
 #define CGROUP_HASH_SIZE_MAX 2048
 
index 971772badef63884d5339f472fe9af993d2695e8..dc8b976b7f0184b6ef857dd56acc2578a334d390 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "bpf-dlopen.h"
 #include "bpf-link.h"
-#include "bpf/restrict_ifaces/restrict-ifaces-skel.h"
+#include "bpf/restrict-ifaces/restrict-ifaces-skel.h"
 
 static struct restrict_ifaces_bpf *restrict_ifaces_bpf_free(struct restrict_ifaces_bpf *obj) {
         restrict_ifaces_bpf__destroy(obj);
index 6838476d048335f7f8e29b47ab8eb134aa7b6c7a..1fc73c19ab711badfd7af698ce57813942dc54ef 100644 (file)
@@ -11,8 +11,8 @@
 /* libbpf, clang, llvm and bpftool compile time dependencies are satisfied */
 #include "bpf-dlopen.h"
 #include "bpf-link.h"
-#include "bpf/socket_bind/socket-bind-api.bpf.h"
-#include "bpf/socket_bind/socket-bind-skel.h"
+#include "bpf/socket-bind/socket-bind-api.bpf.h"
+#include "bpf/socket-bind/socket-bind-skel.h"
 
 static struct socket_bind_bpf *socket_bind_bpf_free(struct socket_bind_bpf *obj) {
         /* socket_bind_bpf__destroy handles object == NULL case */
similarity index 93%
rename from src/core/bpf/restrict_fs/restrict-fs-skel.h
rename to src/core/bpf/restrict-fs/restrict-fs-skel.h
index 825b8131f94e532426d08e963c91afc7cfc738c2..51b15ae812b8a527e41d92a4a86a1f945cb2026a 100644 (file)
@@ -13,4 +13,4 @@
 #define bpf_object__load_skeleton sym_bpf_object__load_skeleton
 #define bpf_object__destroy_skeleton sym_bpf_object__destroy_skeleton
 
-#include "bpf/restrict_fs/restrict-fs.skel.h"
+#include "bpf/restrict-fs/restrict-fs.skel.h"
similarity index 91%
rename from src/core/bpf/restrict_ifaces/restrict-ifaces-skel.h
rename to src/core/bpf/restrict-ifaces/restrict-ifaces-skel.h
index f0675f270ba2a34949bcd29897e97cce958a4d89..fbebad688d93e2512f35c082db0b2e83dfcaea4b 100644 (file)
@@ -13,4 +13,4 @@
 #define bpf_object__load_skeleton sym_bpf_object__load_skeleton
 #define bpf_object__destroy_skeleton sym_bpf_object__destroy_skeleton
 
-#include "bpf/restrict_ifaces/restrict-ifaces.skel.h"
+#include "bpf/restrict-ifaces/restrict-ifaces.skel.h"
similarity index 93%
rename from src/core/bpf/socket_bind/socket-bind-skel.h
rename to src/core/bpf/socket-bind/socket-bind-skel.h
index c92eae002da1c732e9aea65f0084ac6fbf4fb407..72d708dbfc860582950400bd80849f5f9400f3fe 100644 (file)
@@ -13,4 +13,4 @@
 #define bpf_object__load_skeleton sym_bpf_object__load_skeleton
 #define bpf_object__destroy_skeleton sym_bpf_object__destroy_skeleton
 
-#include "bpf/socket_bind/socket-bind.skel.h"
+#include "bpf/socket-bind/socket-bind.skel.h"
index 118fe988a68166ee29141c39d54730d140fed6c4..4667d41ae3fb9695eb1e95b9e6566a33b5e95c4d 100644 (file)
@@ -54,7 +54,7 @@
 #include "bpf-dlopen.h"
 #include "bpf-link.h"
 #include "bpf-restrict-fs.h"
-#include "bpf/restrict_fs/restrict-fs-skel.h"
+#include "bpf/restrict-fs/restrict-fs-skel.h"
 #endif
 
 #define CGROUP_CPU_QUOTA_DEFAULT_PERIOD_USEC (100 * USEC_PER_MSEC)
index 991c3bb0d19c8493e2df40a505261c078b30d041..8bb0054c146aa6ff06b1db6d11f93558d6ea5809 100644 (file)
@@ -70,9 +70,9 @@ libcore_sources = files(
         'varlink-unit.c',
 )
 
-subdir('bpf/socket_bind')
-subdir('bpf/restrict_fs')
-subdir('bpf/restrict_ifaces')
+subdir('bpf/socket-bind')
+subdir('bpf/restrict-fs')
+subdir('bpf/restrict-ifaces')
 
 if conf.get('BPF_FRAMEWORK') == 1
         libcore_sources += [
similarity index 92%
rename from src/network/bpf/sysctl_monitor/sysctl-monitor-skel.h
rename to src/network/bpf/sysctl-monitor/sysctl-monitor-skel.h
index d002414521fbf78174348d3c6c5561448ce07dbe..26ee294578994a30778535781459f8838ac8c9c2 100644 (file)
@@ -13,4 +13,4 @@
 #define bpf_object__load_skeleton sym_bpf_object__load_skeleton
 #define bpf_object__open_skeleton sym_bpf_object__open_skeleton
 
-#include "bpf/sysctl_monitor/sysctl-monitor.skel.h"
+#include "bpf/sysctl-monitor/sysctl-monitor.skel.h"
index 0c8dd46a673b32e557ae74202c182f7cd1c8f387..c6a323c929bcb855a2d8ade69b2759c5234aa9d4 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-subdir('bpf/sysctl_monitor')
+subdir('bpf/sysctl-monitor')
 
 systemd_networkd_sources = files(
         'networkd.c'
index efb9f45df9a8440142a8af2b1ad575c5ebd4f2f0..4f9b6522d7792e5099f1351e11b41b24d6362a88 100644 (file)
@@ -29,8 +29,8 @@
 #if HAVE_VMLINUX_H
 
 #include "bpf-link.h"
-#include "bpf/sysctl_monitor/sysctl-monitor-skel.h"
-#include "bpf/sysctl_monitor/sysctl-write-event.h"
+#include "bpf/sysctl-monitor/sysctl-monitor-skel.h"
+#include "bpf/sysctl-monitor/sysctl-write-event.h"
 
 static struct sysctl_monitor_bpf* sysctl_monitor_bpf_free(struct sysctl_monitor_bpf *obj) {
         sysctl_monitor_bpf__destroy(obj);
similarity index 92%
rename from src/nsresourced/bpf/userns_restrict/userns-restrict-skel.h
rename to src/nsresourced/bpf/userns-restrict/userns-restrict-skel.h
index 271caf46624e8469540f4bbf9904e64a062bc9ea..a7cbeb8e75ae76b19eb31e49feb718a3671a2d68 100644 (file)
@@ -14,4 +14,4 @@
 #define bpf_object__load_skeleton sym_bpf_object__load_skeleton
 #define bpf_object__open_skeleton sym_bpf_object__open_skeleton
 
-#include "bpf/userns_restrict/userns-restrict.skel.h"
+#include "bpf/userns-restrict/userns-restrict.skel.h"
index 805a4788d023d7ecf86143ce5def0b0d85b2ba04..31d334f8111584fe278d294c1e4fd1015ffb543e 100644 (file)
@@ -4,7 +4,7 @@ if conf.get('ENABLE_NSRESOURCED') != 1
         subdir_done()
 endif
 
-subdir('bpf/userns_restrict')
+subdir('bpf/userns-restrict')
 
 systemd_nsresourced_sources = files(
         'nsresourced-manager.c',
index d9c0f611ef87e6de18da1f4d92d84090e6540721..a1a29ba8f6728e9efe356d96a9e9c9ae346262cd 100644 (file)
@@ -4,7 +4,7 @@
 #include "forward.h"
 
 #if HAVE_VMLINUX_H
-#include "bpf/userns_restrict/userns-restrict-skel.h"
+#include "bpf/userns-restrict/userns-restrict-skel.h"
 #else
 struct userns_restrict_bpf;
 #endif
index 639c1128946a2bede97212c6266b6439efb6db74..3a985738ec78d6c1a96b6fd2abd482649a592968 100644 (file)
@@ -26,7 +26,7 @@ extern DLSYM_PROTOTYPE(bpf_map_get_fd_by_id);
 extern DLSYM_PROTOTYPE(bpf_map_lookup_elem);
 extern DLSYM_PROTOTYPE(bpf_map_update_elem);
 /* The *_skeleton APIs are autogenerated by bpftool, the targets can be found
- * in ./build/src/core/bpf/socket_bind/socket-bind.skel.h */
+ * in ./build/src/core/bpf/socket-bind/socket-bind.skel.h */
 extern DLSYM_PROTOTYPE(bpf_object__attach_skeleton);
 extern DLSYM_PROTOTYPE(bpf_object__destroy_skeleton);
 extern DLSYM_PROTOTYPE(bpf_object__detach_skeleton);