Skip to content

Conversation

@ddelnano
Copy link
Member

@ddelnano ddelnano commented Oct 2, 2024

Summary: Update linux_headers_image to support kernels >= 6.3. Add 6.6 headers to fix ARM Container OS issue

#2035 reported an issue where the socket tracer fails to run on a openSUSE MicroOS instance running a 6.11 kernel. This change updates our header building process to support >= 6.3 kernels since upstream broke the source building process from non git trees (binary builds still work outside of git trees).

Going forward, building source packages is only possible in a git-managed tree. Building binary packages does not require git.

This also adds 6.6.x linux headers to the build. A recent bug report identified that recent ARM Container OS clusters fail to start the socket tracer without the 6.6.x headers. COS doesn't have a distro provided linux headers package, which means these installs are dependent on the pre-packaged headers.

Relevant Issues: #2035

Type of change: /kind compatibility

Test Plan: Verified the following

  • Ran full build without upload
  • Built x86_64 and arm64 kernels pre and post 6.3
  • That the previous dockerfile and pre 6.3 dockerfile is same as before
$ git diff main:tools/docker/linux_headers_image/Dockerfile tools/docker/linux_headers_image/Dockerfile.bionic
$

@ddelnano ddelnano requested review from a team as code owners October 2, 2024 17:08
ddelnano added a commit that referenced this pull request Oct 11, 2024
…er kernels (#2041)

Summary: Upgrade bcc and libbpf to fix BPF program compilation on 6.10
and later kernels

Bcc provides some
"[virtual](https://github.com/iovisor/bcc/blob/cb1ba20f4800f556dc940682ba7016c50bd0a3ac/src/cc/exported_files.cc#L28-L48)"
includes to BPF programs. The `compat/linux/virtual_bpf.h` file in
particular needs to be kept in sync with libbpf and matches the [header
guard](https://github.com/iovisor/bcc/blob/cb1ba20f4800f556dc940682ba7016c50bd0a3ac/src/cc/compat/linux/virtual_bpf.h#L9)
of the `include/uapi/linux/bpf.h` file. This means that while our linux
headers were updated, our older bcc install was inserting an older copy
of the `uapi/linux/bpf.h` file -- one that didn't contain the `bpf_wq`
declaration.

```
  include/linux/bpf.h:348:10: error: invalid application of 'sizeof' to an incomplete type 'struct bpf_wq'
                  return sizeof(struct bpf_wq);
                         ^     ~~~~~~~~~~~~~~~
  include/linux/bpf.h:348:24: note: forward declaration of 'struct bpf_wq'
                  return sizeof(struct bpf_wq);
                                       ^
  include/linux/bpf.h:377:10: error: invalid application of '__alignof' to an incomplete type 'struct bpf_wq'
                  return __alignof__(struct bpf_wq);
                         ^          ~~~~~~~~~~~~~~~
  include/linux/bpf.h:377:29: note: forward declaration of 'struct bpf_wq'
                  return __alignof__(struct bpf_wq);
```

Note: while this fixes the 6.10 compilation issue, our 6.10 qemu build
fails without disabling [this
logic](https://github.com/pixie-io/pixie/blob/3c41d554215528e688328aef94192e696db617dc/src/stirling/source_connectors/socket_tracer/socket_trace_connector.cc#L464-L472).
6.10 kernels added BPF token support. This changes the BPF permission
model slightly and causes the BPF instruction limit to be dependent on
the permissions of the BPF syscall caller ([linux
source](https://elixir.bootlin.com/linux/v6.11.1/source/kernel/bpf/syscall.c#L2757)).

This new BPF token logic coupled with our qemu setup, causes our 6.10
build to fallback to the 4096 instruction limit. I'll be addressing this
in #2040 and #2042. Those issues shouldn't block this change since that
loop limit code can be bypasses at runtime with our current cli flags.

Relevant Issues: Closes #2035

Type of change: /kind bugfix

Test Plan: Built 6.10 and 6.11 kernels and the associated linux headers
from #2036 and verified that a local qemu build passes
- [x] Verify `#ci:bpf-build-all-kernels` build passes

Changelog Message: Upgraded bcc and libbpf to support kernels 6.10 and
later

---------

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano force-pushed the ddelnano/add-newer-linux-kernel-headers branch from 147d58d to a66b431 Compare May 6, 2025 05:43
@ddelnano ddelnano requested a review from a team as a code owner May 6, 2025 05:43
@ddelnano ddelnano changed the title Update linux_headers_image to support >= 6.3 kernels. Add 6.2 through 6.11 kernels Update linux_headers_image to support >= 6.3 kernels. Add 6.6 headers to fix ARM Container OS issue May 6, 2025
@ddelnano ddelnano changed the title Update linux_headers_image to support >= 6.3 kernels. Add 6.6 headers to fix ARM Container OS issue [linux headers] Update build to support >= 6.3 kernels. Add 6.6 headers to fix ARM Container OS issue May 6, 2025
ddelnano added 6 commits May 6, 2025 13:56
…kernel versions to header builder list

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
… arm Container OS

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano force-pushed the ddelnano/add-newer-linux-kernel-headers branch from 4720824 to f485f95 Compare May 6, 2025 13:56
Copy link
Member

@vihangm vihangm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the older kernels be built with the 20.04 base image?
in that case, I wonder if it's cleaner to move the header build into a shell script and not fork the Dockerfile.

…mmands

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano
Copy link
Member Author

ddelnano commented May 6, 2025

@vihangm unfortunately older kernel versions fail to build in the focal image. Here's a log of the error when building the 4.15.x:

Kernel build failure
# Verify 20.04 image runs the same commands as the previous, bionic image
$ diff linux_headers_image/Dockerfile*
17,18c17
< # debhelper-compat (= 12) needed for kernels >= 6.3
< FROM ubuntu:20.04@sha256:8feb4d8ca5354def3d8fce243717141ce31e2c428701f6682bd2fafe15388214
---
> FROM ubuntu:18.04@sha256:8aa9c2798215f99544d1ce7439ea9c3a6dfd82de607da1cec3a8a2fae005931b
21d19
< ENV DEBIAN_FRONTEND=noninteractive
37d34
<   debhelper \
64d60
< # Linux 6.3 and later name the resulting package differently (there is no additional -pl suffix)

# Logs from the docker build

KERN_MAJ=$(echo 4.15.18 | cut -d. -f1); \
KERN_MIN=$(echo 4.15.18 | cut -d. -f2); \
HEADERS_DOCKERFILE_SUFFIX=""; \
linux_headers_image_tag="gcr.io/pixie-oss/pixie-dev-public:4.15.18-pl7"; \
docker build --build-arg KERN_VERSION=4.15.18 \
        --build-arg ARCH=x86_64 linux_headers_image \
        -t "${linux_headers_image_tag}" \
        -f linux_headers_image/Dockerfile${HEADERS_DOCKERFILE_SUFFIX} && \
docker run --rm -v /home/ddelnano/code/pixie/tools/docker/.build/linux_headers/assets:/output "${linux_headers_image_tag}"
[+] Building 76.8s (19/26)
 => [internal] load .dockerignore                                                                                                                                                                               0.0s
 => => transferring context: 2B                                                                                                                                                                                 0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                            0.0s
 => => transferring dockerfile: 2.75kB                                                                                                                                                                          0.0s
 => [internal] load metadata for docker.io/library/ubuntu:20.04@sha256:8feb4d8ca5354def3d8fce243717141ce31e2c428701f6682bd2fafe15388214                                                                         0.0s
 => [ 1/22] FROM docker.io/library/ubuntu:20.04@sha256:8feb4d8ca5354def3d8fce243717141ce31e2c428701f6682bd2fafe15388214                                                                                         0.0s
 => [internal] load build context                                                                                                                                                                               0.0s
 => => transferring context: 69B                                                                                                                                                                                0.0s
 => CACHED [ 2/22] RUN apt-get update                                                                                                                                                                           0.0s
 => CACHED [ 3/22] RUN apt-get upgrade -y -q                                                                                                                                                                    0.0s
 => CACHED [ 4/22] RUN apt-get install -y -q build-essential   bc   libelf-dev   libssl-dev   flex   bison   kmod   cpio   rsync   wget   binutils-aarch64-linux-gnu   gcc-aarch64-linux-gnu   dwarves   debhe  0.0s
 => CACHED [ 5/22] WORKDIR /px/src                                                                                                                                                                              0.0s
 => [ 6/22] RUN KERN_MAJ="$(echo "4.15.18" | cut -d'.' -f1)";     wget -nv http://mirrors.edge.kernel.org/pub/linux/kernel/v${KERN_MAJ}.x/linux-4.15.18.tar.gz                                                 22.4s
 => [ 7/22] RUN tar zxf linux-4.15.18.tar.gz                                                                                                                                                                   12.8s
 => [ 8/22] WORKDIR /configs                                                                                                                                                                                    0.0s
 => [ 9/22] ADD x86_64_config /configs/x86_64                                                                                                                                                                   0.0s
 => [10/22] ADD arm64_config /configs/arm64                                                                                                                                                                     0.0s
 => [11/22] WORKDIR /px/src/linux-4.15.18                                                                                                                                                                       0.0s
 => [12/22] RUN cp /configs/x86_64 .config                                                                                                                                                                      0.2s
 => [13/22] RUN make ARCH=x86_64 olddefconfig                                                                                                                                                                   3.4s
 => [14/22] RUN make ARCH=x86_64 clean                                                                                                                                                                          5.4s
 => ERROR [15/22] RUN make ARCH=x86_64 -j $(nproc) deb-pkg LOCALVERSION=-pl                                                                                                                                    32.3s
------
 > [15/22] RUN make ARCH=x86_64 -j $(nproc) deb-pkg LOCALVERSION=-pl:
#0 1.533   HOSTCC  scripts/basic/fixdep
#0 1.848   HOSTCC  scripts/kconfig/conf.o
#0 2.005   HOSTCC  scripts/kconfig/zconf.tab.o
#0 3.376 In file included from scripts/kconfig/zconf.tab.c:2468:
#0 3.376 scripts/kconfig/confdata.c: In function 'conf_write':
#0 3.376 scripts/kconfig/confdata.c:773:19: warning: '%s' directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
#0 3.376   773 |  sprintf(newname, "%s%s", dirname, basename);
#0 3.376       |                   ^~~~~~
#0 3.376 scripts/kconfig/confdata.c:773:19: note: assuming directive output of 7 bytes
#0 3.376 In file included from /usr/include/stdio.h:867,
#0 3.376                  from scripts/kconfig/zconf.tab.c:82:
#0 3.376 /usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: '__builtin___sprintf_chk' output 1 or more bytes (assuming 4104) into a destination of size 4097
#0 3.376    36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
#0 3.376       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 3.376    37 |       __bos (__s), __fmt, __va_arg_pack ());
#0 3.376       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 3.376 In file included from scripts/kconfig/zconf.tab.c:2468:
#0 3.376 scripts/kconfig/confdata.c:776:20: warning: '.tmpconfig.' directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
#0 3.376   776 |   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
#0 3.376       |                    ^~~~~~~~~~~~~~~~~
#0 3.376 In file included from /usr/include/stdio.h:867,
#0 3.376                  from scripts/kconfig/zconf.tab.c:82:
#0 3.376 /usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: '__builtin___sprintf_chk' output between 13 and 4119 bytes into a destination of size 4097
#0 3.376    36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
#0 3.376       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 3.376    37 |       __bos (__s), __fmt, __va_arg_pack ());
#0 3.376       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 3.488   HOSTLD  scripts/kconfig/conf
#0 3.522 scripts/kconfig/conf  --silentoldconfig Kconfig
#0 4.543   CHK     include/config/kernel.release
#0 4.553   UPD     include/config/kernel.release
#0 4.565 make clean
#0 6.301   TAR     linux-4.15.18-pl.tar.gz
#0 29.10 make KBUILD_SRC=
#0 30.25   HOSTCC  scripts/basic/fixdep
#0 30.25   CHK     include/config/kernel.release
#0 30.26   SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
#0 30.26   SYSHDR  arch/x86/include/generated/asm/unistd_32_ia32.h
#0 30.26   SYSHDR  arch/x86/include/generated/asm/unistd_64_x32.h
#0 30.26   SYSTBL  arch/x86/include/generated/asm/syscalls_64.h
#0 30.26   SYSHDR  arch/x86/include/generated/uapi/asm/unistd_32.h
#0 30.26   WRAP    arch/x86/include/generated/uapi/asm/bpf_perf_event.h
#0 30.26   SYSHDR  arch/x86/include/generated/uapi/asm/unistd_64.h
#0 30.26   SYSHDR  arch/x86/include/generated/uapi/asm/unistd_x32.h
#0 30.27   CHK     include/generated/uapi/linux/version.h
#0 30.27   UPD     include/generated/uapi/linux/version.h
#0 30.29   DESCEND  objtool
#0 30.36   HOSTCC   /px/src/linux-4.15.18/tools/objtool/fixdep.o
#0 30.52   HOSTCC  scripts/basic/bin2c
#0 30.52   HOSTLD   /px/src/linux-4.15.18/tools/objtool/fixdep-in.o
#0 30.53   LINK     /px/src/linux-4.15.18/tools/objtool/fixdep
#0 30.57   CC       /px/src/linux-4.15.18/tools/objtool/exec-cmd.o
#0 30.58   CC       /px/src/linux-4.15.18/tools/objtool/help.o
#0 30.59   WRAP    arch/x86/include/generated/asm/clkdev.h
#0 30.59   CC       /px/src/linux-4.15.18/tools/objtool/pager.o
#0 30.59   WRAP    arch/x86/include/generated/asm/dma-contiguous.h
#0 30.59   WRAP    arch/x86/include/generated/asm/early_ioremap.h
#0 30.59   WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
#0 30.59   WRAP    arch/x86/include/generated/asm/mm-arch-hooks.h
#0 30.60   CHK     include/generated/utsrelease.h
#0 30.60   CC       /px/src/linux-4.15.18/tools/objtool/parse-options.o
#0 30.60   UPD     include/generated/utsrelease.h
#0 30.61   GEN      /px/src/linux-4.15.18/tools/objtool/arch/x86/lib/inat-tables.c
#0 30.62   CC       /px/src/linux-4.15.18/tools/objtool/run-command.o
#0 30.63   CC       /px/src/linux-4.15.18/tools/objtool/sigchain.o
#0 30.63 pager.c: In function 'pager_preexec':
#0 30.63 pager.c:36:12: error: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Werror=restrict]
#0 30.63    36 |  select(1, &in, NULL, &in, NULL);
#0 30.63       |            ^~~        ~~~
#0 30.63   CC       /px/src/linux-4.15.18/tools/objtool/subcmd-config.o
#0 30.66 cc1: all warnings being treated as errors
#0 30.66   HOSTCC  scripts/kallsyms
#0 30.67 mv: cannot stat '/px/src/linux-4.15.18/tools/objtool/.pager.o.tmp': No such file or directory
#0 30.67 make[6]: *** [/px/src/linux-4.15.18/tools/build/Makefile.build:96: /px/src/linux-4.15.18/tools/objtool/pager.o] Error 1
#0 30.67 make[6]: *** Waiting for unfinished jobs....
#0 30.67   HOSTCC  scripts/recordmcount
#0 30.67   HOSTCC  scripts/sortextable
#0 30.70   HOSTCC  arch/x86/tools/relocs_32.o
#0 30.71   HOSTCC  arch/x86/tools/relocs_64.o
#0 30.71   CC      scripts/mod/empty.o
#0 30.71   HOSTCC  scripts/mod/mk_elfconfig
#0 30.71   HOSTCC  arch/x86/tools/relocs_common.o
#0 30.74   CC      scripts/mod/devicetable-offsets.s
#0 30.75   CC       /px/src/linux-4.15.18/tools/objtool/arch/x86/decode.o
#0 30.77   HOSTCC  scripts/asn1_compiler
#0 30.77   HOSTCC  scripts/sign-file
#0 30.80   CHK     scripts/mod/devicetable-offsets.h
#0 30.81   UPD     scripts/mod/devicetable-offsets.h
#0 30.81   MKELF   scripts/mod/elfconfig.h
#0 30.82   HOSTCC  scripts/mod/modpost.o
#0 30.85   HOSTCC  scripts/mod/file2alias.o
#0 30.87   HOSTCC  scripts/mod/sumversion.o
#0 30.87   HOSTCC  scripts/extract-cert
#0 30.88   CC       /px/src/linux-4.15.18/tools/objtool/builtin-check.o
#0 30.89   CC       /px/src/linux-4.15.18/tools/objtool/builtin-orc.o
#0 30.89   CC       /px/src/linux-4.15.18/tools/objtool/check.o
#0 30.90   CC       /px/src/linux-4.15.18/tools/objtool/orc_gen.o
#0 30.90   CC       /px/src/linux-4.15.18/tools/objtool/orc_dump.o
#0 30.90   CC       /px/src/linux-4.15.18/tools/objtool/elf.o
#0 30.91   CC       /px/src/linux-4.15.18/tools/objtool/special.o
#0 30.91   CC       /px/src/linux-4.15.18/tools/objtool/objtool.o
#0 30.91   CC       /px/src/linux-4.15.18/tools/objtool/libstring.o
#0 30.91   CC       /px/src/linux-4.15.18/tools/objtool/str_error_r.o
#0 30.93   HOSTLD  arch/x86/tools/relocs
#0 30.94 ../lib/str_error_r.c: In function 'str_error_r':
#0 30.94 ../lib/str_error_r.c:25:3: error: passing argument 1 to restrict-qualified parameter aliases with argument 5 [-Werror=restrict]
#0 30.94    25 |   snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d", errnum, buf, buflen, err);
#0 30.94       |   ^~~~~~~~
#0 30.95 cc1: all warnings being treated as errors
#0 30.96 mv: cannot stat '/px/src/linux-4.15.18/tools/objtool/.str_error_r.o.tmp': No such file or directory
#0 30.96 make[5]: *** [Build:22: /px/src/linux-4.15.18/tools/objtool/str_error_r.o] Error 1
#0 30.96 make[5]: *** Waiting for unfinished jobs....
#0 31.09 make[5]: *** [Makefile:52: /px/src/linux-4.15.18/tools/objtool/libsubcmd-in.o] Error 2
#0 31.09 make[4]: *** [Makefile:54: /px/src/linux-4.15.18/tools/objtool/libsubcmd.a] Error 2
#0 31.09 make[4]: *** Waiting for unfinished jobs....
#0 31.14   LD       /px/src/linux-4.15.18/tools/objtool/arch/x86/objtool-in.o
#0 31.33   HOSTLD  scripts/mod/modpost
#0 31.55   CC      arch/x86/purgatory/purgatory.o
#0 31.55   AS      arch/x86/purgatory/stack.o
#0 31.55   AS      arch/x86/purgatory/setup-x86_64.o
#0 31.55   CC      arch/x86/purgatory/sha256.o
#0 31.55   AS      arch/x86/purgatory/entry64.o
#0 31.55   CC      arch/x86/purgatory/string.o
#0 31.63 make[4]: *** [Makefile:46: /px/src/linux-4.15.18/tools/objtool/objtool-in.o] Error 2
#0 31.63 make[3]: *** [Makefile:63: objtool] Error 2
#0 31.63 make[2]: *** [Makefile:1649: tools/objtool] Error 2
#0 31.63 make[2]: *** Waiting for unfinished jobs....
#0 31.78   LD      arch/x86/purgatory/purgatory.ro
#0 31.78   BIN2C   arch/x86/purgatory/kexec-purgatory.c
#0 31.79 make[1]: *** [scripts/package/Makefile:88: deb-pkg] Error 2
#0 31.79 make: *** [Makefile:1360: deb-pkg] Error 2
------
Dockerfile:60
--------------------
  58 |     RUN make ARCH=${ARCH} olddefconfig
  59 |     RUN make ARCH=${ARCH} clean
  60 | >>> RUN make ARCH=${ARCH} -j $(nproc) deb-pkg LOCALVERSION=-pl
  61 |
  62 |     # Extract headers into a tarball

ddelnano added 2 commits May 12, 2025 20:22
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
…multiple Dockerfiles

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano
Copy link
Member Author

@vihangm I ended up consolidating the docker images by refactoring the build logic in a shell script. Highlighting this in case you want to look over it again.

…y build args in favor of pure env var usage

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano force-pushed the ddelnano/add-newer-linux-kernel-headers branch from 5a5ac3f to 925f5f2 Compare May 14, 2025 03:35
@ddelnano ddelnano merged commit 6ec8dcf into pixie-io:main May 15, 2025
27 checks passed
@ddelnano ddelnano deleted the ddelnano/add-newer-linux-kernel-headers branch May 15, 2025 18:53
ddelnano added a commit to ddelnano/pixie that referenced this pull request Aug 6, 2025
…er kernels (pixie-io#2041)

Summary: Upgrade bcc and libbpf to fix BPF program compilation on 6.10
and later kernels

Bcc provides some
"[virtual](https://github.com/iovisor/bcc/blob/cb1ba20f4800f556dc940682ba7016c50bd0a3ac/src/cc/exported_files.cc#L28-L48)"
includes to BPF programs. The `compat/linux/virtual_bpf.h` file in
particular needs to be kept in sync with libbpf and matches the [header
guard](https://github.com/iovisor/bcc/blob/cb1ba20f4800f556dc940682ba7016c50bd0a3ac/src/cc/compat/linux/virtual_bpf.h#L9)
of the `include/uapi/linux/bpf.h` file. This means that while our linux
headers were updated, our older bcc install was inserting an older copy
of the `uapi/linux/bpf.h` file -- one that didn't contain the `bpf_wq`
declaration.

```
  include/linux/bpf.h:348:10: error: invalid application of 'sizeof' to an incomplete type 'struct bpf_wq'
                  return sizeof(struct bpf_wq);
                         ^     ~~~~~~~~~~~~~~~
  include/linux/bpf.h:348:24: note: forward declaration of 'struct bpf_wq'
                  return sizeof(struct bpf_wq);
                                       ^
  include/linux/bpf.h:377:10: error: invalid application of '__alignof' to an incomplete type 'struct bpf_wq'
                  return __alignof__(struct bpf_wq);
                         ^          ~~~~~~~~~~~~~~~
  include/linux/bpf.h:377:29: note: forward declaration of 'struct bpf_wq'
                  return __alignof__(struct bpf_wq);
```

Note: while this fixes the 6.10 compilation issue, our 6.10 qemu build
fails without disabling [this
logic](https://github.com/pixie-io/pixie/blob/3c41d554215528e688328aef94192e696db617dc/src/stirling/source_connectors/socket_tracer/socket_trace_connector.cc#L464-L472).
6.10 kernels added BPF token support. This changes the BPF permission
model slightly and causes the BPF instruction limit to be dependent on
the permissions of the BPF syscall caller ([linux
source](https://elixir.bootlin.com/linux/v6.11.1/source/kernel/bpf/syscall.c#L2757)).

This new BPF token logic coupled with our qemu setup, causes our 6.10
build to fallback to the 4096 instruction limit. I'll be addressing this
in pixie-io#2040 and pixie-io#2042. Those issues shouldn't block this change since that
loop limit code can be bypasses at runtime with our current cli flags.

Relevant Issues: Closes pixie-io#2035

Type of change: /kind bugfix

Test Plan: Built 6.10 and 6.11 kernels and the associated linux headers
from pixie-io#2036 and verified that a local qemu build passes
- [x] Verify `#ci:bpf-build-all-kernels` build passes

Changelog Message: Upgraded bcc and libbpf to support kernels 6.10 and
later

---------

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
GitOrigin-RevId: 738111f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants