Skip to content

Commit

Permalink
Revert "llvm: Upgrade to LLVM 18.1.6"
Browse files Browse the repository at this point in the history
This is to avoid the below verifier issue in cilium/cilium

```
    --- FAIL: TestVerifier/bpf_host (111.35s)
        --- FAIL: TestVerifier/bpf_host/1 (24.05s)
        --- FAIL: TestVerifier/bpf_host/2 (21.32s)
	...
```

Sample error log for TestVerifier/bpf_host/1

```
    verifier_test.go:244: Error: program tail_nodeport_nat_ingress_ipv4: load program: argument list too long: BPF program is too large. Processed 1000001 insn (1445 line(s) omitted)
        Verifier error tail: load program: argument list too long:
        	(1436 line(s) omitted)
        	; struct ipv4_ct_tuple icmp_tuple = {
        	1201: (63) *(u32 *)(r10 -12) = r1
        	; .flags = tuple->flags | TUPLE_F_RELATED,
        	1202: (71) r1 = *(u8 *)(r10 -123)
        	; .flags = tuple->flags | TUPLE_F_RELATED,
        	1203: (44) w1 |= 2
        	; struct ipv4_ct_tuple icmp_tuple = {
        	1204: (73) *(u8 *)(r10 -3) = r1
        	BPF program is too large. Processed 1000001 insn
        	processed 1000001 insns (limit 1000000) max_states_per_insn 17 total_states 55755 peak_states 1015 mark_read 59
```

Sample error log for TestVerifier/bpf_host/2
```
    verifier_test.go:244: Error: program tail_nodeport_nat_ingress_ipv4: load program: argument list too long: BPF program is too large. Processed 1000001 insn (1445 line(s) omitted)
        Verifier error tail: load program: argument list too long:
        	(1436 line(s) omitted)
        	; struct ipv4_ct_tuple icmp_tuple = {
        	1201: (63) *(u32 *)(r10 -12) = r1
        	; .flags = tuple->flags | TUPLE_F_RELATED,
        	1202: (71) r1 = *(u8 *)(r10 -123)
        	; .flags = tuple->flags | TUPLE_F_RELATED,
        	1203: (44) w1 |= 2
        	; struct ipv4_ct_tuple icmp_tuple = {
        	1204: (73) *(u8 *)(r10 -3) = r1
        	BPF program is too large. Processed 1000001 insn
        	processed 1000001 insns (limit 1000000) max_states_per_insn 17 total_states 55755 peak_states 1015 mark_read 59
```

This reverts commit 11cfa1a.
  • Loading branch information
sayboras committed Jul 15, 2024
1 parent 8103285 commit 7a6e713
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion images/llvm/checkout-llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -o errexit
set -o pipefail
set -o nounset

rev="llvmorg-18.1.6"
rev="llvmorg-17.0.6"

git config --global user.email "[email protected]"
git config --global user.name "Cilium Maintainers"
Expand Down
4 changes: 2 additions & 2 deletions images/llvm/test/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ commandTests:
args: ["--version"]
expectedOutput:
- 'LLVM\ \(http://llvm\.org/\):'
- 'LLVM\ version\ 18\.1\.6'
- 'LLVM\ version\ 17\.0\.6'
- 'Optimized\ build\.'
- 'Registered\ Targets:'
- '(bpf|bpfeb|bpfel)[\ ]+-\ BPF\ \((host|big|little)\ endian\)'
Expand All @@ -24,7 +24,7 @@ commandTests:
command: "clang"
args: ["--version"]
expectedOutput:
- 'clang\ version\ 18\.1\.6\ \(https://github.com/llvm/llvm-project.git\ .*\)'
- 'clang\ version\ 17\.0\.6\ \(https://github.com/llvm/llvm-project.git\ .*\)'
- 'InstalledDir:\ /usr/local/bin'

- name: "clang can compile a simple BPF program"
Expand Down

0 comments on commit 7a6e713

Please sign in to comment.