Skip to content

[ciqlts9_4] Multiple patches tested (2 commits)#859

Open
ciq-kernel-automation[bot] wants to merge 2 commits intociqlts9_4from
{rnicolescu}_ciqlts9_4
Open

[ciqlts9_4] Multiple patches tested (2 commits)#859
ciq-kernel-automation[bot] wants to merge 2 commits intociqlts9_4from
{rnicolescu}_ciqlts9_4

Conversation

@ciq-kernel-automation
Copy link

Summary

This PR has been automatically created after successful completion of all CI stages.

Commit Message(s)

selftests/bpf: Fix pyperf180 compilation failure with clang18

jira LE-2125
commit-author Yonghong Song <yonghong.song@linux.dev>
commit 100888fb6d8a185866b1520031ee7e3182b173de
TEST 4

Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>

Test Results

✅ Build Stage

✅ Boot Verification

✅ Kernel Selftests

⚠️ Test Comparison

  • Status: Skipped
  • Reason: No baseline test results available from ciqlts9_4
  • Note: Manual review recommended to ensure no regressions

🤖 This PR was automatically generated by GitHub Actions
Run ID: 21759486403

bmastbergen and others added 2 commits February 4, 2026 15:53
jira LE-2125
commit-author Yonghong Song <yonghong.song@linux.dev>
commit 100888f

With latest clang18 (main branch of llvm-project repo), when building bpf selftests,
    [~/work/bpf-next (master)]$ make -C tools/testing/selftests/bpf LLVM=1 -j

The following compilation error happens:
    fatal error: error in backend: Branch target out of insn range
    ...
    Stack dump:
    0.      Program arguments: clang -g -Wall -Werror -D__TARGET_ARCH_x86 -mlittle-endian
      -I/home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/include
      -I/home/yhs/work/bpf-next/tools/testing/selftests/bpf -I/home/yhs/work/bpf-next/tools/include/uapi
      -I/home/yhs/work/bpf-next/tools/testing/selftests/usr/include -idirafter
      /home/yhs/work/llvm-project/llvm/build.18/install/lib/clang/18/include -idirafter /usr/local/include
      -idirafter /usr/include -Wno-compare-distinct-pointer-types -DENABLE_ATOMICS_TESTS -O2 --target=bpf
      -c progs/pyperf180.c -mcpu=v3 -o /home/yhs/work/bpf-next/tools/testing/selftests/bpf/pyperf180.bpf.o
    1.      <eof> parser at end of file
    2.      Code generation
    ...

The compilation failure only happens to cpu=v2 and cpu=v3. cpu=v4 is okay
since cpu=v4 supports 32-bit branch target offset.

The above failure is due to upstream llvm patch [1] where some inlining behavior
are changed in clang18.

To workaround the issue, previously all 180 loop iterations are fully unrolled.
The bpf macro __BPF_CPU_VERSION__ (implemented in clang18 recently) is used to avoid
unrolling changes if cpu=v4. If __BPF_CPU_VERSION__ is not available and the
compiler is clang18, the unrollng amount is unconditionally reduced.

  [1] llvm/llvm-project@1a2e77c

	Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
	Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
	Tested-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/bpf/20231110193644.3130906-1-yonghong.song@linux.dev
(cherry picked from commit 100888f)
	Signed-off-by: Brett Mastbergen <bmastbergen@ciq.com>
Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

🤖 Validation Checks In Progress Workflow run: https://github.com/ctrliq/kernel-src-tree/actions/runs/21765808292

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Validation checks completed successfully View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/21765808292

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants