October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
BPF

How to Build Linux 6.3-rc1 for BPF Development and Testing

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To build Linux 6.3-rc1 for BPF work, check out the exact v6.3-rc1 tag, configure the kernel, compile it with one consistent output directory, boot that kernel, and run the BPF selftests from the same source tree. Enable BTF only if you need it; when CONFIG_DEBUG_INFO_BTF is enabled, the documented requirement is pahole version 1.16 or newer.

v6.3-rc1 is a historical release candidate, tagged March 5, 2023 at commit fe15c26ee26efa11741a7b632e9f23b01aca4cc6. It is useful for reproducing or investigating that code base, but it is not a current general-purpose kernel recommendation.

1. Get the exact Linux 6.3-rc1 source

Use the tag rather than an unpinned branch so the kernel and its BPF tests correspond to the same source revision.

git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux
git checkout v6.3-rc1
git rev-parse HEAD

The final command should print fe15c26ee26efa11741a7b632e9f23b01aca4cc6. If you already have a kernel checkout, fetch the tag first and then check it out.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Prepare a configuration

Configuration is not optional when moving to a new kernel version: new options can be introduced. Start with a suitable existing configuration, then carry it forward with oldconfig, or create one using one of the kernel’s configuration targets.

mkdir -p ../linux-6.3-rc1-build
make O=../linux-6.3-rc1-build oldconfig

For an interactive starting point, use make O=../linux-6.3-rc1-build menuconfig instead. The important rule for an out-of-tree build is consistency: supply the same O=../linux-6.3-rc1-build setting on every kernel-tree make invocation. This keeps generated files out of the source tree and prevents commands from operating on different configurations.

Select the BPF, tracing, debugging, networking, and architecture options required by the programs or tests you intend to run. The exact set depends on the tests and target architecture; do not assume that a generic configuration enables every BPF feature.

3. Check build prerequisites

Requirements vary with architecture and selected configuration. The kernel’s versioned dependency documentation should be treated as authoritative for a reproducibility exercise. The adjacent 6.1 requirements page lists these minimums, but that list is not a captured 6.3-rc1 inventory:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Tool Documented minimum in the cited requirements page Qualification
GNU make 3.81 or newer General kernel build requirement; options and architecture can add dependencies.
binutils 2.23 or newer Required for the toolchain used by the selected architecture.
flex 2.5.35 or newer Needed by parts of the kernel build system.
bison 2.0 or newer Needed by parts of the kernel build system.
pahole 1.16 or newer Required when CONFIG_DEBUG_INFO_BTF is enabled to generate BTF from DWARF; not required for every build.

Use the Documentation/process/changes.rst file inside the 6.3-rc1 tree to check the historically exact package inventory. A distribution’s package names and compiler versions are environment-specific, so a command that installs dependencies on one distribution should not be presented as universal.

For BPF code compiled with LLVM, verify that the installed LLVM toolchain registers the BPF target:

llc --version

Inspect the reported targets for a BPF entry. LLVM’s BPF backend is upstream, but an incomplete or mismatched installation can still prevent BPF programs or selftests from compiling.

4. Build the kernel

Ordinary compilation can run as an unprivileged user. With the configuration prepared, build using the same output directory:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
make O=../linux-6.3-rc1-build -j"$(nproc)"

To inspect the complete compiler and linker commands while diagnosing a failure, add V=1:

make O=../linux-6.3-rc1-build V=1 -j"$(nproc)"

Keep the resulting kernel, modules, and matching configuration together. If modules are enabled, installation is a separate, privileged operation:

sudo make O=../linux-6.3-rc1-build modules_install
sudo make O=../linux-6.3-rc1-build install

The exact bootloader update procedure is distribution-specific. Confirm that the new entry points to the 6.3-rc1 kernel and its matching modules before selecting it.

5. Boot safely and confirm the kernel

Keep a known-good kernel available in the boot menu. The kernel README cautions that development releases contain new, not-yet-debugged code; that is a general warning about development releases, not evidence of a particular 6.3-rc1 defect.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

After booting the new entry, verify the running release before testing:

uname -r

Do not run the BPF validation suite against a different kernel than the one you built. If the new kernel does not boot or lacks a required option, select the known-good entry, correct the configuration or installation, and rebuild.

6. Build and run the matching BPF selftests

Use the selftests in tools/testing/selftests/bpf/ from the same Linux 6.3-rc1 tree. Tests from a newer mainline tree may encode newer verifier behavior or APIs and are not a reliable substitute for the matching suite.

  1. Boot the newly installed 6.3-rc1 kernel.

  2. Change to the BPF selftest directory in the checked-out tree:

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    cd tools/testing/selftests/bpf
  3. Build and run the documented suite:

    sudo make run_tests
  4. For verifier-focused testing, run:

    sudo ./test_verifier

Match the kernel .config as closely as possible to the BPF selftest configuration fragment. A configuration mismatch can cause individual test programs not to compile. The BPF documentation describes BPF_STRICT_BUILD=0 as a way to continue compiling the remaining tests when some test builds fail:

sudo make BPF_STRICT_BUILD=0 run_tests

That setting does not make an incompatible test pass; it allows the rest of the suite to proceed so you can identify which tests were skipped or failed.

7. Choose the right build arrangement

Decision Recommended choice Why it matters
Generated files Out-of-tree build with a consistent O= Keeps artifacts separate and avoids accidentally mixing configurations.
BTF Enable CONFIG_DEBUG_INFO_BTF only when required Enabling it adds the conditional pahole requirement; disabling it avoids that generation step.
Selftest source Use tools/testing/selftests/bpf/ from the same tag Verifier expectations and test interfaces change over time.
Build diagnostics Add V=1 when troubleshooting Shows the full commands needed to locate missing tools, flags, or paths.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

8. Where libbpf fits

libbpf is a userspace loader library for BPF applications; building it is separate from building the kernel. Its build instructions use the libbpf source directory and provide ordinary make and installation targets. libelf and zlib are internal dependencies of that userspace library build. Installing or compiling libbpf does not replace the kernel toolchain, kernel configuration, BTF, or selftest steps described above.

Common failure patterns

The build uses stale or mixed generated files

Check that every kernel-tree command includes the same O= path. Re-run configuration in that output directory rather than alternating between in-tree and out-of-tree commands.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

BTF generation stops on a missing or old pahole

Confirm whether CONFIG_DEBUG_INFO_BTF is enabled. If it is, provide pahole 1.16 or newer; if BTF is not needed, disable the option instead of treating pahole as a universal kernel prerequisite.

BPF selftests fail to compile

Verify that the running kernel is the newly built one, that the tests come from the same 6.3-rc1 tree, and that the kernel configuration matches the selftest configuration fragment. Use BPF_STRICT_BUILD=0 only to continue past configuration-dependent compilation failures while identifying the affected tests.

The verifier results look inconsistent

Do not substitute a newer selftest checkout for the matching suite. Test and verifier expectations evolve together, so a newer suite can report failures that do not represent a defect in the older kernel under examination.

The Bottom Line

For a reproducible Linux 6.3-rc1 BPF build, pin the v6.3-rc1 tag, configure it deliberately, use one consistent O= directory, install pahole only when BTF is enabled, boot the resulting kernel, and run the selftests shipped in that same tree.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.