Parcourir la source

ci: combine BTF + eBPF + FUSE-BPF into one BPF stack feature

TheWildJames il y a 3 semaines
Parent
commit
ecca5b3c53

+ 19 - 0
.github/actions/btf/action.yml

@@ -167,3 +167,22 @@ runs:
       with:
         config_list: |
           CONFIG_DEBUG_INFO_BTF=y
+
+    - name: Enable eBPF Kernel Configs
+      uses: ./.github/actions/set-kernel-config
+      with:
+        config_list: |
+          # eBPF support (Issue #176) — tiny safe programs that run in the kernel
+          # to trace/control events. Requires BTF above for CO-RE to work.
+          CONFIG_BPF_EVENTS=y
+          CONFIG_KPROBE_EVENTS=y
+          CONFIG_UPROBES=y
+          CONFIG_UPROBE_EVENTS=y
+
+    - name: Enable FUSE-BPF Kernel Config
+      uses: ./.github/actions/set-kernel-config
+      with:
+        config_list: |
+          # FUSE-BPF support (Issue #211) — FUSE filesystems backed by eBPF
+          # programs. Sits on eBPF (Issue #176) above.
+          CONFIG_FUSE_BPF=y

+ 0 - 17
.github/actions/ebpf/action.yml

@@ -1,17 +0,0 @@
-name: 'Enable eBPF Support'
-description: 'Enable eBPF program support configs in the kernel (Issue #176)'
-
-runs:
-  using: "composite"
-  steps:
-    - name: Enable eBPF Kernel Configs
-      uses: ./.github/actions/set-kernel-config
-      with:
-        config_list: |
-          # eBPF support (Issue #176) — tiny safe programs that run in the kernel
-          # to trace/control events. BTF (enabled separately) is only on 6.1+;
-          # the older build system lacks the toolchain needed for BTF emission.
-          CONFIG_BPF_EVENTS=y
-          CONFIG_KPROBE_EVENTS=y
-          CONFIG_UPROBES=y
-          CONFIG_UPROBE_EVENTS=y

+ 0 - 13
.github/actions/fuse-bpf-config/action.yml

@@ -1,13 +0,0 @@
-name: 'Enable FUSE-BPF Kernel Support'
-description: 'Enable CONFIG_FUSE_BPF kernel-side support (Issue #211)'
-
-runs:
-  using: "composite"
-  steps:
-    - name: Enable FUSE-BPF Kernel Config
-      uses: ./.github/actions/set-kernel-config
-      with:
-        config_list: |
-          # FUSE-BPF support (Issue #211) — FUSE filesystems backed by eBPF
-          # programs. Requires eBPF support (Issue #176) enabled underneath.
-          CONFIG_FUSE_BPF=y

+ 3 - 11
.github/workflows/build.yml

@@ -126,7 +126,7 @@ jobs:
         os_patch_level: ${{ inputs.os_patch_level }}
 
     - name: Build FUSE-BPF Userspace Daemon (Issue #211)
-      if: ${{ contains(inputs.feature_set, 'FUSE_BPF') && contains(inputs.version, 'lts') && inputs.version == 'android16-6.12' }}
+      if: ${{ contains(inputs.feature_set, 'BPF') && contains(inputs.version, 'lts') && inputs.version == 'android16-6.12' }}
       uses: ./.github/actions/fuse-bpf
       with:
         version: ${{ inputs.version }}
@@ -265,16 +265,8 @@ jobs:
     - name: Setup Misc Configs
       uses: ./.github/actions/misc
 
-    - name: Enable eBPF Support
-      if: contains(inputs.feature_set, 'EBPF')
-      uses: ./.github/actions/ebpf
-
-    - name: Enable FUSE-BPF Kernel Support
-      if: contains(inputs.feature_set, 'FUSE_BPF')
-      uses: ./.github/actions/fuse-bpf-config
-
-    - name: Enable BTF
-      if: contains(inputs.feature_set, 'BTF')
+    - name: Enable BPF Stack (BTF + eBPF + FUSE-BPF)
+      if: contains(inputs.feature_set, 'BPF')
       uses: ./.github/actions/btf
       with:
         version: ${{ inputs.version }}

+ 3 - 13
.github/workflows/main.yml

@@ -69,16 +69,8 @@ on:
         description: "Unicode Fix"
         type: boolean
         default: true
-      use_btf:
-        description: "BTF"
-        type: boolean
-        default: true
-      use_ebpf:
-        description: "eBPF"
-        type: boolean
-        default: true
-      use_fuse_bpf:
-        description: "FUSE-BPF"
+      use_bpf:
+        description: "BPF Stack (BTF + eBPF + FUSE-BPF)"
         type: boolean
         default: true
       use_perf:
@@ -249,9 +241,7 @@ jobs:
           [ "${{ inputs.use_ntsync }}" = "true" ] && FEATURES="${FEATURES}NTSync+"
           [ "${{ inputs.use_ptrace }}" = "true" ] && FEATURES="${FEATURES}Ptrace+"
           [ "${{ inputs.use_unicode }}" = "true" ] && FEATURES="${FEATURES}Unicode+"
-          [ "${{ inputs.use_btf }}" = "true" ] && FEATURES="${FEATURES}BTF+"
-          [ "${{ inputs.use_ebpf }}" = "true" ] && FEATURES="${FEATURES}EBPF+"
-          [ "${{ inputs.use_fuse_bpf }}" = "true" ] && FEATURES="${FEATURES}FUSE_BPF+"
+          [ "${{ inputs.use_bpf }}" = "true" ] && FEATURES="${FEATURES}BPF+"
           [ "${{ inputs.use_perf }}" = "true" ] && FEATURES="${FEATURES}Perf+"
           echo "feature_set=${FEATURES%+}" >> "$GITHUB_OUTPUT"
 

+ 1 - 1
.github/workflows/root-variants.yml

@@ -115,7 +115,7 @@ jobs:
     uses: ./.github/workflows/prepare.yml
     with:
       config_file: ${{ needs.resolve-pins.outputs.config_file }}
-      feature_set: SUSFS+NTSync+Ptrace+Unicode+BTF+EBPF+FUSE_BPF
+      feature_set: SUSFS+NTSync+Ptrace+Unicode+BPF
       susfs_commit: ${{ needs.resolve-pins.outputs.susfs_commit }}
       root_flavor: ${{ matrix.flavor }}
       root_commit: ${{ matrix.commit }}