Commit Graph

9366 Commits

Author SHA1 Message Date
Vincent Li
32c15c3fe3 xdp-tools: add xdp-sni
add XDP TLS/SSL SNI parsing

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-30 03:24:30 +00:00
Vincent Li
2cf44838bf lfs/linux: install perf tool from linux source
compile and install perf tool from linux
source for performance monitoring.

change the setting before run perf

echo -1 > /proc/sys/kernel/perf_event_paranoid
echo 0 > /proc/sys/kernel/kptr_restrict

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-23 23:44:53 +00:00
Vincent Li
6f60c4696f lfs/flash-images: missing serial linux command
Add the missing serial linux command so the
flash image can be converted to qcow2, the
bpfire qcow2 image can be deployed in KVM
virtual environment through serial console
installation.

for exmaple:

virsh define BPFire-VM.xml
virsh start BPFire-VM
virsh console BPFire-VM

we will have serial console access to BPFire
VM and the installation will start.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-23 17:56:26 +00:00
Vincent Li
f89feeb197 kernel: use BPFire logo in kernel
how to generate logo format:

apt-get install netpbm

1 convert png format to ppm format

pngtopnm bpfire-logo.png > bpfire-logo.ppm

2 reduce the color count to 224

ppmquant 224 bpfire-logo.ppm > bpfire-logo-224.ppm

3 convert ppm raw format to ascii format

pnmnoraw bpfire-logo-224.ppm > bpfire-logo-ascii.ppm
cp bpfire-logo-ascii.ppm config/kernel/

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-21 02:41:51 +00:00
Vincent Li
ecad4000f2 lunatik: change /lib/modules kernel path to 6.10
whenever compile kernel due to kernel change
lunatik needs to be recompiled too since
lunatik depends on kernel

change filter example Makefile to depend on
current kernel build version

diff --git a/examples/filter/Makefile b/examples/filter/Makefile
index f7eb0f6d..e30566a2 100644
--- a/examples/filter/Makefile
+++ b/examples/filter/Makefile
@@ -1,10 +1,12 @@
 # SPDX-FileCopyrightText: (c) 2023-2024 Ring Zero Desenvolvimento de Software LTDA
 # SPDX-License-Identifier: MIT OR GPL-2.0-only

+VMLINUX_BTF_PATH = /lib/modules/${shell uname -r}/build
+
 all: vmlinux https.o

 vmlinux:
-       bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h
+       bpftool btf dump file $(VMLINUX_BTF_PATH)/vmlinux format c > vmlinux.h

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-21 02:41:51 +00:00
Vincent Li
1f42b720d0 kernel: upgrade to 6.10.11
upgrade kernel to recent stable release 6.10.11

1, scripts/kconfig/merge_config.sh does not work for 6.10.11
2, vmlinux BTF binary name changed in 6.10.11
3, remove rtl8812au for now since it has compiling error
4, remove 5.15 nfqueue patch since it does not apply cleanly

also see [0]

[0]: https://github.com/vincentmli/BPFire/issues/41

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-21 02:39:49 +00:00
Vincent Li
0e29b73703 Revert "lunatik: 'bpf_luaxdp_run': BTF not found in kernel"
This reverts commit cacf5f209d.

libbpf version is irrelevant, revert the change

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-17 17:23:27 +00:00
Vincent Li
6723112498 lunatik: missing module BTF kfuncs not regstered
error when run lunatik which loads lunatik kernel modules

root@bpfire-2 lua]# lunatik run examples/filter/sni false

[root@bpfire-2 lua]# dmesg

[  330.411665] lunatik: loading out-of-tree module taints kernel.
[  330.411680] lunatik: module verification failed: signature and/or required key missing - tainting kernel
[  330.433955] Kernel module BTF mismatch detected, BTF debug info may be unavailable for some modules
[  330.767701] missing module BTF, cannot register kfuncs

BPFire chroot build mount /sys/kernel/btf/vmlinux which is
the host binary vmlinux BTF to build against lunatik kernel module,
which result in above error. adjust BPFire kernel build to save
the binary vmlinux BTF to chroot
/lib/modules/6.6.15-ipfire/build/vmlinux for lunatik kernel module.

create the vmlinux.h from the same binary vmlinux BTF for the ebpf https.o

lunatik kernel module is depending on kernel build, adjust the lunatik
build accordingly when kerne upgrade in future.

See https://github.com/vincentmli/BPFire/issues/40
see https://github.com/luainkernel/lunatik/issues/189

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-17 17:22:22 +00:00
Vincent Li
cacf5f209d lunatik: 'bpf_luaxdp_run': BTF not found in kernel
xdp-loader to load https.o result in error below:

libbpf: loading kernel BTF '/sys/kernel/btf/vmlinux': 0
  libbpf: extern (func ksym) 'bpf_luaxdp_run': not found in kernel or module BTFs
  libbpf: failed to load object '/usr/lib/bpf/https.o'
 libxdp: Failed to load program filter_https: Invalid argument
Couldn't attach XDP program on iface 'green0': Invalid argument(-22)

xdp-tools/xdp-loader is built statically with libbpf 1.2
should not be xdp-loader libbpf issue

still try to upgrade bpfire libbpf to 1.3.0 for testing

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-16 01:00:40 +00:00
Vincent Li
dc97ffb40e lunatik: Unknown symbol in module
lunatik requires lunatik_sym.h before build
generate the symbols in chroot build.

remove lunatik_sym.h in origin lunatik source Makefile

root@r210:/home/vincent/go/src/github.com/vincentmli/BPFire/cache/lunatik-5.3.2# git diff
diff --git a/Makefile b/Makefile
index ec172541..1c72f3e1 100644
--- a/Makefile
+++ b/Makefile
@@ -3,14 +3,14 @@

 MODULES_INSTALL_PATH = /lib/modules/${shell uname -r}
 SCRIPTS_INSTALL_PATH = /lib/modules/lua
-LUNATIK_INSTALL_PATH = /usr/local/sbin
-LUA_API = lua/lua.h lua/lauxlib.h lua/lualib.h
+LUNATIK_INSTALL_PATH = /usr/sbin
+LUNATIK_EBPF_INSTALL_PATH = /usr/lib/bpf
 KDIR ?= ${MODULES_INSTALL_PATH}/build
 RM = rm -f
 MKDIR = mkdir -p -m 0755
 INSTALL = install -o root -g root

-all: lunatik_sym.h
+all:
        ${MAKE} -C ${KDIR} M=${PWD} CONFIG_LUNATIK=m    \
        CONFIG_LUNATIK_RUN=m CONFIG_LUNATIK_RUNTIME=y CONFIG_LUNATIK_DEVICE=m   \
        CONFIG_LUNATIK_LINUX=m CONFIG_LUNATIK_NOTIFIER=m CONFIG_LUNATIK_SOCKET=m \
@@ -46,6 +46,7 @@ examples_install:
        ${INSTALL} -m 0644 examples/echod/*.lua ${SCRIPTS_INSTALL_PATH}/examples/echod
        ${MKDIR} ${SCRIPTS_INSTALL_PATH}/examples/filter
        ${INSTALL} -m 0644 examples/filter/*.lua ${SCRIPTS_INSTALL_PATH}/examples/filter
+       ${INSTALL} -m 0644 examples/filter/*.o ${LUNATIK_EBPF_INSTALL_PATH}
        ${MKDIR} ${SCRIPTS_INSTALL_PATH}/examples/dnsblock
        ${INSTALL} -m 0644 examples/dnsblock/*.lua ${SCRIPTS_INSTALL_PATH}/examples/dnsblock
        ${MKDIR} ${SCRIPTS_INSTALL_PATH}/examples/dnsdoctor
@@ -69,7 +70,3 @@ install: scripts_install modules_install

 uninstall: scripts_uninstall modules_uninstall
        depmod -a
-
-lunatik_sym.h: $(LUA_API)
-       ${shell ./gensymbols.sh $(LUA_API) > lunatik_sym.h}
-

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-15 18:48:48 +00:00
Vincent Li
7212a66761 lunatik: re-arrange lunatik and kernel build order
lunatik kernel modules requires kernel to be built first
so /lib/modules is available for lunatik

lunatik also requires resolve_btfids under:

/lib/modules/$(VER)-$(VERSUFIX)/build/tools/bpf/resolve_btfids/

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-15 02:27:17 +00:00
Vincent Li
c690c0c447 lunatik: add lunatik addon
lunatik has LuaXDP that supports scripting XDP
for TLS SNI parsing and many other scripting
featuers for kernel.

see lunatik build workaround in detail

https://github.com/luainkernel/lunatik/issues/189
https://github.com/vincentmli/BPFire/issues/40

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-14 22:46:06 +00:00
Vincent Li
74cf8a3943 xdp-tools: add XDP DNS domain denylist
upgrade xdp-tools and add XDP DNS domain
denylist bpf and user space program.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-12 17:12:16 +00:00
Vincent Li
49d330f2a8 LoxiLB: increase the default session timeout
increase default inactive timeout for established
sessions like ssh session

diff --git a/pkg/loxinet/rules.go b/pkg/loxinet/rules.go
index a67d974..27a9c08 100644
--- a/pkg/loxinet/rules.go
+++ b/pkg/loxinet/rules.go
@@ -85,7 +85,7 @@ const (
        DflHostProbeTimeout        = 60        // Default probe timeout for end-point host
        InitHostProbeTimeout       = 15        // Initial probe timeout for end-point host
        MaxHostProbeTime           = 24 * 3600 // Max possible host health check duration
-       LbDefaultInactiveTimeout   = 4 * 60    // Default inactive timeout for established sessions
+       LbDefaultInactiveTimeout   = 10 * 60   // Default inactive timeout for established sessions
        LbDefaultInactiveNSTimeout = 20        // Default inactive timeout for non-session oriented protocols
        LbMaxInactiveTimeout       = 24 * 3600 // Maximum inactive timeout for established sessions
        MaxEndPointCheckers        = 4         // Maximum helpers to check endpoint health

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-10 03:03:28 +00:00
Vincent Li
85540f1359 loxilib: upgrade to current development tree
test new loxilb features like fullproxy L7

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-08-28 21:05:18 +00:00
Vincent Li
17f5f3d6cf loxicmd: upgrade to current development tree
test new loxilb features like fullproxy L7 proxy

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-08-28 21:03:55 +00:00
Vincent Li
be30db19f3 golang: upgrade golang to 1.23.0 release
when add loxilb development tree, loxilb requires go >= 1.23.0

    ranlib libloxilbdp.a
    make[3]: Leaving directory '/usr/src/loxilb-0.9.x/loxilb-ebpf/kernel'
    make[2]: Leaving directory '/usr/src/loxilb-0.9.x/loxilb-ebpf'
    go: go.mod requires go >= 1.23.0 (running go 1.22.0)
    make[1]: *** [Makefile:14: build] Error 1
    make[1]: Leaving directory '/usr/src/loxilb-0.9.x'
    make: *** [loxilb:76: /usr/src/log/loxilb-0.9.x] Error 2

after upgrading golang to 1.23.0, loxilb development tree result in error

    make[2]: Leaving directory '/usr/src/loxilb-0.9.x/loxilb-ebpf'
    # runtime
    /usr/lib/go/src/runtime/mbitmap_noallocheaders.go:53:2: mallocHeaderSize redeclared in this block
    /usr/lib/go/src/runtime/mbitmap.go:71:2: other declaration of mallocHeaderSize
    /usr/lib/go/src/runtime/mbitmap_noallocheaders.go:54:2: minSizeForMallocHeader redeclared in this block

the workaround is to remove build/usr/lib/go directory, then
rm log/go-1.23.0, ./make.sh build to re-add go 1.23.0

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-08-28 15:43:13 +00:00
Vincent Li
84eba5982a loxicmd: upgrade to 0.9.6 release
adopted loxicmd changes in https://github.com/vincentmli/BPFire/issues/30
to work out the UI permission issue.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-08-25 14:12:54 +00:00
Vincent Li
cc0eebaa2f LoxiLB: upgrade to loxilb 0.9.6
upgrade loxilb to 0.9.6 release

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-08-23 18:16:26 +00:00
Vincent Li
56a1588f96 vim: Disable vim automatic visual mode on mouse select
when mouse select, vim automatically turns into
visual mode, this is not convienent when copy
and paste in vim with mouse select. create this
setting for root user.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-09 02:41:58 +00:00
Vincent Li
02724e7427 LoxiLB: enable firewall SNAT for green network
when loxilb is enabled and started, enable the
firewall SNAT for green network so green network
could have initiate outgoing traffic like internet
access.

we can achieve this by restoring firewall SNAT setting
from default /var/ipfire/loxilb/FWconfig.txt when loxilb
start up with --config-path=/var/ipfire/loxilb thanks
to the enhancement addressed in issue:

https://github.com/loxilb-io/loxilb/issues/706

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-09 01:47:46 +00:00
Vincent Li
9f7cd8358f LoxiLB: upgrade to loxilb development branch
LoxiLB 0.9.4 lack of SNAT feature for egress traffic
initiated from BPFire green network, when loxilb is
enabled, it breaks BPFire green network client Internet
access, this issue is fixed in the loxilb development
branch, temporarily I make loxilb development branch
as 0.9.5 in BPFire so I could test the SNAT feature and
it works.

see detail in https://github.com/loxilb-io/loxilb/issues/718

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-09 01:47:37 +00:00
Vincent Li
a06eab4ae1 keepalived vs/rs UI: add virtual/real server UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-05 21:46:07 +00:00
Vincent Li
fa69bf1da3 openssh: update openssh due to CVE-2024-6387
Update from version 9.7p1 to 9.8p1

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-02 19:36:16 +00:00
Vincent Li
e7e1e67fc7 initscripts: start loxilb keepalived after reboot
When loxilb and keepalived are enabled, after BPFire
rebooted, loxilb and keepalived failed to start and
shows as "STOPPED" from UI, this is not expected since
we want to loxilb and keepalived to continue to be enabled
after reboot based on the enabled state of loxilb and
keepalived before reboot.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-01 17:30:54 +00:00
Vincent Li
ed89f965bf keepalived UI: add keepalived UI
BPFire red0 does not support multicast, need to
have unicast peer configured, then the virtual
ipaddress can be added to red0 interface.

the UI requires /var/ipfire/keepalived/runsettings
/var/ipfire/keepalived/settings to be created, so
add them lfs/configroot

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-29 20:55:28 +00:00
Vincent Li
5955087887 keepalived: move keepalived to core package
change keepalived default config to
/var/ipfire/keepalived/keepalived.conf so keepalived WebUI
could read/write the configuration file. also add
/var/ipfire/keepalived directory

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

keepalived: create /var/ipfire/keepalived
2024-06-29 19:13:10 +00:00
Vincent Li
a221be1818 LoxiLB: upgrade loxicmd to 0.9.4
upgrade procedure:

git clone https://github.com/loxilb-io/loxicmd.git
cd loxicmd
git checkout -b v0.9.4 v0.9.4
go mod vendor
cd ..
mv loxicmd loxicmd-0.9.4
tar cvf loxicmd-0.9.4.tar loxicmd-0.9.4
gzip loxicmd-0.9.4.tar
cp loxicmd-0.9.4.tar.gz <BPFire source>/cache/
b2sum <BPFire source>/cache/loxicmd-0.9.4.tar.gz

modify lfs/loxicmd to change the version and b2sum checksum

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-14 18:16:43 +00:00
Vincent Li
b9b523d293 Loxilb: upgrade loxilb to 0.9.4
upgrade procedure:

git clone --recurse-submodules https://github.com/loxilb-io/loxilb.git
cd loxilb
git checkout -b v0.9.4 v0.9.4
go mod vendor
cd ..
mv loxilb loxilb-0.9.4
tar cvf loxilb-0.9.4.tar loxilb-0.9.4
gzip loxilb-0.9.4.tar
cp loxilb-0.9.4.tar.gz <BPFire source>/cache/
b2sum <BPFire source>/cache/loxilb-0.9.4.tar.gz

modify lfs/loxilb to change the version and b2sum checksum

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-14 18:15:07 +00:00
Vincent Li
0c2b510130 add loxilb start/stop init script and settings
when rebuid the image, do:

rm log/configroot
rm log/initscripts

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-27 18:23:09 +00:00
Vincent Li
fb763397b4 loxilb: add loxilb load balancer addon
build loxilb in BPFire requires golang 1.22.0,
but then had issue [0], run go mod vendor to
prepare the loxilb to download golang dependencies
package beforehand to avoid issue [0]

loxilb-ebpf build also requires gnu/stubs-32.h
use [1] as workaround

[0]: https://github.com/vincentmli/BPFire/issues/18
[1]: https://github.com/vincentmli/BPFire/issues/16

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-13 18:00:30 +00:00
Vincent Li
a7ed289c04 golang: upgrade from 1.20.4 to 1.22.0
meet loxilb 1.22.0 requirements
see https://github.com/vincentmli/BPFire/issues/19

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-13 14:34:14 +00:00
Vincent Li
927b3dfe54 loxicmd addon
Avoid downloading golang dependency packages
during build time due to issue [0], run
go mod vendor so loxicmd source include vendor
directory to include golang dependency packages

[0]: https://github.com/vincentmli/BPFire/issues/18

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-13 14:33:10 +00:00
Vincent Li
0000eed295 Add Loxilb ntc and libmd libbsd addon
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-11 17:41:01 +00:00
Vincent Li
04cb6cc6ff libbpf: switch to libbpf 0.8.3
use libbpf 0.8.3 for loxilb

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-03 16:52:40 +00:00
Vincent Li
be1fc5ce77 xdp-tools: add xdp-udp
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-24 00:48:04 +00:00
Vincent Li
fcdc42ea40 ddos.cgi add DNS DDoS UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-18 02:29:27 +00:00
Vincent Li
9a53289a23 ddos.cgi add UDP DDoS WebUI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-17 00:17:41 +00:00
Vincent Li
d7544e6192 Enable kernel BPF without tracing capability
enable kernel BPF XDP/TC capability, no tracing

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-09 01:50:14 +00:00
Vincent Li
9f86b661cb Add xdp dns rate limit program with bpf_printk deleted
XDP dns rate limit program has static tail call
which requires revert xdp-tool commit:
(039bdea "xdp-loader: Only load the BPF program we need from object files")

XDP dns rate limit program also uses bpf_printk helper which is not
supported on FireBeeOS since kernel CONFIG_BPF_EVENTS which allows user
to do kprobe, uprobe, tracepoint is not enabled, so bpf_printk helper is
not available, so removed bpf_printk

see discussion in [0] xdp-loader load xdp program with bpf tail call result in Bad file descriptor(-9)

[0] https://github.com/xdp-project/xdp-tools/issues/377

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-08 19:15:32 +00:00
Vincent Li
35f1987b14 Revert "Add ecapture add-on"
This reverts commit 0864b3a5ba.

User might be concerned firewall admin user capture SSL clear
text, so remove ecapture.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-07 15:22:00 +00:00
Vincent Li
ff7a427189 strip kernel module to reduce image size
set strip option to 1 which is to strip modules
debug info. tried to strip all but result in file
system not found during iso installation.

fix: https://github.com/vincentmli/FireBeeOS/issues/3

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-06 18:43:15 +00:00
Vincent Li
8e4e24a9b9 Add XDP DDoS ddos.cgi
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-20 17:42:07 +00:00
Vincent Li
baf1d4a604 Disable vim automatic visual mode on mouse select
when mouse select, vim automatically turns into
visual mode, this is not convienent when copy
and paste in vim with mouse select.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-14 23:50:24 +00:00
Vincent Li
eefbd2ef87 mount bpffs for XDP program
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-04 22:15:09 +00:00
Vincent Li
0864b3a5ba Add ecapture add-on
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:02 +00:00
Vincent Li
05ac4be397 add bpftool and re-arrange lfs build order
add lfs bpftool from [0] first to meet lfs
xdp-tools requirement.

also re-arrange BPF related add-on build order
to meet lfs knot build since it requires XDP
xsk.h

[0] https://github.com/libbpf/bpftool/releases/download/v7.3.0/bpftool-libbpf-v7.3.0-sources.tar.gz

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:02 +00:00
Vincent Li
f8ca312cfa Add xdp-tools add-on with XDP Synproxy
add xdp-tools utilities with addition of
SYN flooding DDoS attack protection in XDP

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:02 +00:00
Vincent Li
292ed31c4d Add clang add-on
xdp-tools requires clang, add clang during build
to meet xdp-tools requirement.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:02 +00:00
Vincent Li
5de4e5e9e9 Add pahole during build
add pahole add-on during build to
allow kernel with BPF/BTF enabled
to be built. no need to install pahole
since we only need it during build.

the procedure to prepare pahole tar ball:

download pahole from [0]
untar it and download libbpf from [1]
and untar libbpf

then:

rm pahole-1.25/lib/bpf
mv libbpf-1.3.0 to pahole-1.25/lib/
cd pahole-1.25/lib/
mv libbpf-1.3.0 bpf
cd ../../
tar -czcf pahole-1.25.tar.gz pahole-1.25

mv pahole-1.25.tar.gz ipfire-2.x/cache
b2sum ipfire-2.x/cache/pahole-1.25.tar.gz

Note cmake without optimization -O2 in
lfs/pahole result in _FORTIFY_SOURCE requires
optimzation error since ipfire glibc built
with --enable-fortify-source

this also avoid the hack in [2]

[0]https://git.kernel.org/pub/scm/devel/pahole/pahole.git/snapshot/pahole-1.25.tar.gz
[1]https://github.com/libbpf/libbpf/archive/refs/tags/v1.3.0.tar.gz
[2]https://community.ipfire.org/t/how-to-customize-config-kernel-kernel-config-x86-64-ipfire/11100/8

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:02 +00:00